Fix #846: Geeqie Find duplicates segfaults when drag & dropping images
authorColin Clark <colin.clark@cclark.uk>
Sun, 9 Jan 2022 15:39:38 +0000 (15:39 +0000)
committerColin Clark <colin.clark@cclark.uk>
Sun, 9 Jan 2022 15:39:38 +0000 (15:39 +0000)
https://github.com/BestImageViewer/geeqie/issues/846

Calls to file_data_ref() needed.

src/dupe.c

index a573d1b..0cedf8b 100644 (file)
@@ -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)