X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Fcollect-io.c;h=bb9967d424ba5602a3e7753147e8cb13660ce6ab;hp=1f6cf0506d56ca3046761baf6048539e5c7b31d8;hb=c4114f7d7b6baa193ba4fbeb8693becfcd256943;hpb=be9732c7d09ebdbf1fc703c80229c789904b47a7 diff --git a/src/collect-io.c b/src/collect-io.c index 1f6cf050..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; } } }