aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-tree-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-table/e-tree-model.c')
-rw-r--r--widgets/e-table/e-tree-model.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/e-table/e-tree-model.c b/widgets/e-table/e-tree-model.c
index c57bf2d683..f6d8ddddd5 100644
--- a/widgets/e-table/e-tree-model.c
+++ b/widgets/e-table/e-tree-model.c
@@ -446,6 +446,9 @@ e_tree_model_row_of_node (ETreeModel *etree, ETreePath *node)
{
int i;
+ if (etree->root == node)
+ return -1;
+
for (i = 0; i < etree->row_array->len; i ++)
if (g_array_index (etree->row_array, GNode*, i) == node)
return i;