diff options
-rw-r--r-- | widgets/table/e-tree-selection-model.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index e359b9aa07..70ae105a77 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -837,7 +837,7 @@ etsm_selected_count_recurse (ETreeSelectionModel *etsm, if (selection_node->children) { ETreePath child = e_tree_model_node_get_first_child(E_TREE_MODEL(etsm->priv->model), path); int i; - for (i = 0; i < selection_node->num_children; i++, child = e_tree_model_node_get_next(E_TREE_MODEL(etsm->priv->model), child)) + for (i = 0; child && i < selection_node->num_children; i++, child = e_tree_model_node_get_next(E_TREE_MODEL(etsm->priv->model), child)) if (selection_node->children[i]) etsm_selected_count_recurse (etsm, selection_node->children[i], child, count); } |