X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Fcollect-io.c;h=bb9967d424ba5602a3e7753147e8cb13660ce6ab;hp=a8d9a7f3f7351a4c33771fd158de72f06ff0f128;hb=c4114f7d7b6baa193ba4fbeb8693becfcd256943;hpb=b286338544a2c60acb1332f3cb90f6b355af00fb diff --git a/src/collect-io.c b/src/collect-io.c index a8d9a7f3..bb9967d4 100644 --- a/src/collect-io.c +++ b/src/collect-io.c @@ -497,8 +497,14 @@ static void collect_manager_entry_free_data(CollectManagerEntry *entry) collect_manager_action_unref(action); } g_list_free(entry->add_list); - g_hash_table_destroy(entry->oldpath_hash); - g_hash_table_destroy(entry->newpath_hash); + if (g_hash_table_size(entry->oldpath_hash) > 0) + g_hash_table_destroy(entry->oldpath_hash); + else + g_hash_table_unref(entry->oldpath_hash); + if (g_hash_table_size(entry->newpath_hash) > 0) + g_hash_table_destroy(entry->newpath_hash); + else + g_hash_table_unref(entry->newpath_hash); } static void collect_manager_entry_init_data(CollectManagerEntry *entry) @@ -704,6 +710,8 @@ static void collect_manager_refresh(void) else { collect_manager_entry_free(entry); + + entry = NULL; } } } @@ -725,7 +733,7 @@ static void collect_manager_refresh(void) static void collect_manager_process_actions(gint max) { if (collection_manager_action_list) DEBUG_1("collection manager processing actions"); - + while (collection_manager_action_list != NULL && max > 0) { CollectManagerAction *action; @@ -784,12 +792,11 @@ static void collect_manager_process_actions(gint max) static gboolean collect_manager_process_entry(CollectManagerEntry *entry) { CollectionData *cd; - gboolean success; if (entry->empty) return FALSE; cd = collection_new(entry->path); - success = collection_load_private(cd, entry->path, COLLECTION_LOAD_NONE); + (void) collection_load_private(cd, entry->path, COLLECTION_LOAD_NONE); collection_unref(cd); @@ -935,7 +942,7 @@ void collect_manager_flush(void) void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer data) { if (!(type & NOTIFY_CHANGE) || !fd->change) return; - + DEBUG_1("Notify collect_manager: %s %04x", fd->path, type); switch (fd->change->type) {