From: Colin Clark Date: Sun, 9 Jan 2022 15:39:38 +0000 (+0000) Subject: Fix #846: Geeqie Find duplicates segfaults when drag & dropping images X-Git-Tag: v1.7~6 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=9f4df5c23bd9d93021c0effbf427ad47b3c4ff39 Fix #846: Geeqie Find duplicates segfaults when drag & dropping images https://github.com/BestImageViewer/geeqie/issues/846 Calls to file_data_ref() needed. --- diff --git a/src/dupe.c b/src/dupe.c index a573d1bf..0cedf8b2 100644 --- a/src/dupe.c +++ b/src/dupe.c @@ -3013,6 +3013,7 @@ void dupe_window_add_files(DupeWindow *dw, GList *list, gboolean recurse) { /* Add only the files, ignore the dirs when no recurse */ dw->add_files_queue = g_list_prepend(dw->add_files_queue, work_file->data); + file_data_ref((FileData *)work_file->data); work_file = work_file->next; } g_list_free(f); @@ -3022,6 +3023,7 @@ void dupe_window_add_files(DupeWindow *dw, GList *list, gboolean recurse) else { dw->add_files_queue = g_list_prepend(dw->add_files_queue, fd); + file_data_ref(fd); } } if (dw->add_files_queue_id == 0)