diff options
author | Christian Hergert <christian@hergert.me> | 2015-08-20 11:13:30 -0700 |
---|---|---|
committer | Christian Hergert <christian@hergert.me> | 2015-08-20 11:13:30 -0700 |
commit | b37400752bdc282888e13c9d74aa3e904bab8283 (patch) | |
tree | 571412cb23083f0ae2a48fb65792070d0a3b8e8f | |
parent | 391149fc0ac802a8dd49162c91c258e6175b0940 (diff) | |
download | gtk+-b37400752bdc282888e13c9d74aa3e904bab8283.tar.gz |
treeview: check for pixel cache before setting property
Code exists in the wild that calls this function after the widget has
been destroyed (and the pixel cache released). Simply check that the
pixel cache exists to preserve the existing state.
-rw-r--r-- | gtk/gtktreeview.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index a0286a7b3e..6de8ff29e7 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -11541,7 +11541,8 @@ gtk_tree_view_set_model (GtkTreeView *tree_view, if (tree_view->priv->selection) _gtk_tree_selection_emit_changed (tree_view->priv->selection); - _gtk_pixel_cache_set_always_cache (tree_view->priv->pixel_cache, (model != NULL)); + if (tree_view->priv->pixel_cache != NULL) + _gtk_pixel_cache_set_always_cache (tree_view->priv->pixel_cache, (model != NULL)); if (gtk_widget_get_realized (GTK_WIDGET (tree_view))) gtk_widget_queue_resize (GTK_WIDGET (tree_view)); |