# HG changeset patch # User zas_ # Date 1209833897 0 # Node ID 85b9cec260bc553f526ea0c933978b1ec42ef2e4 # Parent 514a4525d651f1d7a26a78b98cfe7c45962c803e Fix a bug occuring when using certain actions on a collection item which is not in the selection. Triggering it will either result in an assertion failure or a segfault. To reproduce: - open a collection - right-click on a non-selected image - select Delete... menu entry (or Copy, Move, Rename, Properties...) It results in the best case: ** ERROR **: file filelist.c: line 905 (file_data_ref): assertion failed: (fd->magick == 0x12345678) or a pure segfault due to corrupted data. collection_table_popup_file_list() has to return a list of filedata * not a list of gchar *. diff -r 514a4525d651 -r 85b9cec260bc src/collect-table.c --- a/src/collect-table.c Sat May 03 15:19:35 2008 +0000 +++ b/src/collect-table.c Sat May 03 16:58:17 2008 +0000 @@ -569,7 +569,7 @@ return collection_table_selection_get_list(ct); } - return g_list_append(NULL, g_strdup(ct->click_info->fd->path)); + return g_list_append(NULL, file_data_ref(ct->click_info->fd)); } static void collection_table_popup_edit_cb(GtkWidget *widget, gpointer data)