aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-tree-model.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index 508fe1d7c5..a508584a85 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -142,12 +142,15 @@ e_tree_path_unlink (ETreePath *path)
void
e_tree_model_node_traverse (ETreeModel *model, ETreePath *path, ETreePathFunc func, gpointer data)
{
- ETreePath *child;
+ ETreePath *child = path->first_child;
- for (child = path->first_child; child; child = child->next_sibling) {
+ while (child) {
+ ETreePath *next_child = child->next_sibling;
e_tree_model_node_traverse (model, child, func, data);
if (func (model, child, data) == TRUE)
return;
+
+ child = next_child;
}
}