[gnome-builder] tree: fix warning when rebuilding tree



commit 7b6c0bf7f13c30e04374ce199f09a25230a584d8
Author: Christian Hergert <christian hergert me>
Date:   Mon Feb 9 09:03:16 2015 -0800

    tree: fix warning when rebuilding tree

 src/tree/gb-tree-node.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/tree/gb-tree-node.c b/src/tree/gb-tree-node.c
index b6ccb26..d484077 100644
--- a/src/tree/gb-tree-node.c
+++ b/src/tree/gb-tree-node.c
@@ -93,7 +93,8 @@ _gb_tree_node_set_tree (GbTreeNode *node,
 {
   g_return_if_fail (GB_IS_TREE_NODE (node));
   g_return_if_fail (GB_IS_TREE (tree));
-  g_return_if_fail (node->priv->tree == NULL);
+  g_return_if_fail ((node->priv->tree == NULL) ||
+                    (node->priv->tree == tree));
 
   node->priv->tree = tree;
 }


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