aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-11-11 04:39:41 +0800
committerChris Lahey <clahey@src.gnome.org>2001-11-11 04:39:41 +0800
commit388862bcc0d18f9da02a73ebe08cdf91e235b155 (patch)
tree82e36d733795e214bf2d764bcef5c52b942734a9
parent207ba3e3c5d9aa930777d345aa39b8c27c6fd5a2 (diff)
downloadgsoc2013-evolution-388862bcc0d18f9da02a73ebe08cdf91e235b155.tar
gsoc2013-evolution-388862bcc0d18f9da02a73ebe08cdf91e235b155.tar.gz
gsoc2013-evolution-388862bcc0d18f9da02a73ebe08cdf91e235b155.tar.bz2
gsoc2013-evolution-388862bcc0d18f9da02a73ebe08cdf91e235b155.tar.lz
gsoc2013-evolution-388862bcc0d18f9da02a73ebe08cdf91e235b155.tar.xz
gsoc2013-evolution-388862bcc0d18f9da02a73ebe08cdf91e235b155.tar.zst
gsoc2013-evolution-388862bcc0d18f9da02a73ebe08cdf91e235b155.zip
Don't select all if the source model doesn't have a root node (it used to
2001-11-07 Christopher James Lahey <clahey@ximian.com> * e-tree-selection-model.c (etsm_select_all): Don't select all if the source model doesn't have a root node (it used to crash.) Fixes Ximian bug #14542. svn path=/trunk/; revision=14661
-rw-r--r--widgets/table/e-tree-selection-model.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c
index 05adb5a612..9cdf9e9d4a 100644
--- a/widgets/table/e-tree-selection-model.c
+++ b/widgets/table/e-tree-selection-model.c
@@ -890,6 +890,11 @@ static void
etsm_select_all (ESelectionModel *selection)
{
ETreeSelectionModel *etsm = E_TREE_SELECTION_MODEL(selection);
+ ETreePath root;
+
+ root = e_tree_model_get_root(E_TREE_MODEL(etsm->priv->ets));
+ if (root == NULL)
+ return;
etsm_real_clear (etsm);
@@ -898,7 +903,7 @@ etsm_select_all (ESelectionModel *selection)
etsm->priv->root->all_children_selected = TRUE;
etsm->priv->root->any_children_selected = TRUE;
- e_tree_selection_model_node_fill_children(etsm, e_tree_model_get_root(E_TREE_MODEL(etsm->priv->ets)), etsm->priv->root);
+ e_tree_selection_model_node_fill_children(etsm, root, etsm->priv->root);
etsm->priv->root->all_children_selected_array = e_bit_array_new(etsm->priv->root->num_children);
etsm->priv->root->any_children_selected_array = e_bit_array_new(etsm->priv->root->num_children);
e_bit_array_select_all(etsm->priv->root->all_children_selected_array);