Skip to content

Commit

Permalink
fixed crash in file list
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Aug 29, 2012
1 parent edb1e37 commit 2d51dd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/view_file_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2d51dd3

Please sign in to comment.