Mercurial > geeqie
comparison 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 |
comparison
equal
deleted
inserted
replaced
564:514a4525d651 | 565:85b9cec260bc |
---|---|
567 if (INFO_SELECTED(ct->click_info)) | 567 if (INFO_SELECTED(ct->click_info)) |
568 { | 568 { |
569 return collection_table_selection_get_list(ct); | 569 return collection_table_selection_get_list(ct); |
570 } | 570 } |
571 | 571 |
572 return g_list_append(NULL, g_strdup(ct->click_info->fd->path)); | 572 return g_list_append(NULL, file_data_ref(ct->click_info->fd)); |
573 } | 573 } |
574 | 574 |
575 static void collection_table_popup_edit_cb(GtkWidget *widget, gpointer data) | 575 static void collection_table_popup_edit_cb(GtkWidget *widget, gpointer data) |
576 { | 576 { |
577 CollectTable *ct; | 577 CollectTable *ct; |