[gnome-builder] tree: return NULL path for root node
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] tree: return NULL path for root node
- Date: Sat, 20 Jun 2015 09:44:47 +0000 (UTC)
commit 278452cc9a037ef32382e692ec8583f63ac5d9ca
Author: Christian Hergert <christian hergert me>
Date: Sun Jun 14 20:10:32 2015 -0700
tree: return NULL path for root node
src/tree/gb-tree-node.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/tree/gb-tree-node.c b/src/tree/gb-tree-node.c
index 6bd202f..411afcf 100644
--- a/src/tree/gb-tree-node.c
+++ b/src/tree/gb-tree-node.c
@@ -199,6 +199,9 @@ gb_tree_node_get_path (GbTreeNode *node)
g_return_val_if_fail (GB_IS_TREE_NODE (node), NULL);
+ if ((node->parent == NULL) || (node->tree == NULL))
+ return NULL;
+
do
list = g_list_prepend (list, node);
while ((node = node->parent));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]