summaryrefslogtreecommitdiff
path: root/gtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtree.c')
-rw-r--r--gtree.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gtree.c b/gtree.c
index 0fbf62f80..5b4e342bb 100644
--- a/gtree.c
+++ b/gtree.c
@@ -218,7 +218,8 @@ g_tree_traverse (GTree *tree,
rtree = (GRealTree*) tree;
- g_return_if_fail (rtree->root != NULL);
+ if (!rtree->root)
+ return;
switch (traverse_type)
{
@@ -253,7 +254,8 @@ g_tree_search (GTree *tree,
if (rtree->root)
return g_tree_node_search (rtree->root, search_func, data);
- return NULL;
+ else
+ return NULL;
}
gint
@@ -267,7 +269,8 @@ g_tree_height (GTree *tree)
if (rtree->root)
return g_tree_node_height (rtree->root);
- return 0;
+ else
+ return 0;
}
gint
@@ -281,7 +284,8 @@ g_tree_nnodes (GTree *tree)
if (rtree->root)
return g_tree_node_count (rtree->root);
- return 0;
+ else
+ return 0;
}
static GTreeNode*