fixed crash in file list
authorVladimir Nadvornik <nadvornik@suse.cz>
Wed, 29 Aug 2012 21:27:06 +0000 (23:27 +0200)
committerVladimir Nadvornik <nadvornik@suse.cz>
Wed, 29 Aug 2012 21:27:06 +0000 (23:27 +0200)
src/view_file_list.c

index dc225e4..06edf9f 100644 (file)
@@ -185,6 +185,10 @@ static gboolean vflist_store_clear_cb(GtkTreeModel *model, GtkTreePath *path, Gt
 {
        FileData *fd;
        gtk_tree_model_get(model, iter, FILE_COLUMN_POINTER, &fd, -1);
+
+       /* it seems that gtk_tree_store_clear may call some callbacks
+          that use the column. Set the pointer to NULL to be safe. */
+       gtk_tree_store_set(GTK_TREE_STORE(model), iter, FILE_COLUMN_POINTER, NULL, -1);
        file_data_unref(fd);
        return FALSE;
 }