diff src/collect-table.c @ 565:85b9cec260bc

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 *.
author zas_
date Sat, 03 May 2008 16:58:17 +0000
parents b7e99bfeadc9
children 9dc0513837b5
line wrap: on
line diff
--- 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)