[libdazzle] tree: handle NULL selection post-destruction



commit a38db527cf6dcf9db1109048777b806bed6661e4
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 5 02:27:49 2017 -0700

    tree: handle NULL selection post-destruction

 src/tree/dzl-tree.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/tree/dzl-tree.c b/src/tree/dzl-tree.c
index 1b9ac4c..cc287b0 100644
--- a/src/tree/dzl-tree.c
+++ b/src/tree/dzl-tree.c
@@ -1259,7 +1259,8 @@ dzl_tree_set_root (DzlTree     *self,
       GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (self));
       GtkTreeModel *current;
 
-      gtk_tree_selection_unselect_all (selection);
+      if (selection != NULL)
+        gtk_tree_selection_unselect_all (selection);
 
       if (priv->root != NULL)
         {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]