changeset 2112:61a8f2feee49

fixed crash in file list
author Vladimir Nadvornik <nadvornik@suse.cz>
date Wed, 29 Aug 2012 23:27:06 +0200
parents 821cab3e2fd8
children cd964ad91212
files src/view_file_list.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/view_file_list.c	Tue Aug 28 19:23:54 2012 +0200
+++ b/src/view_file_list.c	Wed Aug 29 23:27:06 2012 +0200
@@ -185,6 +185,10 @@
 {
 	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;
 }