diff --git a/ChangeLog b/ChangeLog index ed739e8241..5eb402265b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-26 Richard Hult + + * gtk/gtktreeview.c (gtk_tree_view_expand_all): Fix + #72586. Silently accept empty tree. + (gtk_tree_view_collapse_all): Likewise. + 2002-02-26 Tor Lillqvist * gtk/gtk.def: A couple of name changes. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index ed739e8241..5eb402265b 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2002-02-26 Richard Hult + + * gtk/gtktreeview.c (gtk_tree_view_expand_all): Fix + #72586. Silently accept empty tree. + (gtk_tree_view_collapse_all): Likewise. + 2002-02-26 Tor Lillqvist * gtk/gtk.def: A couple of name changes. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ed739e8241..5eb402265b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-02-26 Richard Hult + + * gtk/gtktreeview.c (gtk_tree_view_expand_all): Fix + #72586. Silently accept empty tree. + (gtk_tree_view_collapse_all): Likewise. + 2002-02-26 Tor Lillqvist * gtk/gtk.def: A couple of name changes. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index ed739e8241..5eb402265b 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-02-26 Richard Hult + + * gtk/gtktreeview.c (gtk_tree_view_expand_all): Fix + #72586. Silently accept empty tree. + (gtk_tree_view_collapse_all): Likewise. + 2002-02-26 Tor Lillqvist * gtk/gtk.def: A couple of name changes. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ed739e8241..5eb402265b 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-02-26 Richard Hult + + * gtk/gtktreeview.c (gtk_tree_view_expand_all): Fix + #72586. Silently accept empty tree. + (gtk_tree_view_collapse_all): Likewise. + 2002-02-26 Tor Lillqvist * gtk/gtk.def: A couple of name changes. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ed739e8241..5eb402265b 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-02-26 Richard Hult + + * gtk/gtktreeview.c (gtk_tree_view_expand_all): Fix + #72586. Silently accept empty tree. + (gtk_tree_view_collapse_all): Likewise. + 2002-02-26 Tor Lillqvist * gtk/gtk.def: A couple of name changes. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ed739e8241..5eb402265b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-02-26 Richard Hult + + * gtk/gtktreeview.c (gtk_tree_view_expand_all): Fix + #72586. Silently accept empty tree. + (gtk_tree_view_collapse_all): Likewise. + 2002-02-26 Tor Lillqvist * gtk/gtk.def: A couple of name changes. diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 4057a04171..88ed840005 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -8368,7 +8368,9 @@ void gtk_tree_view_expand_all (GtkTreeView *tree_view) { g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); - g_return_if_fail (tree_view->priv->tree != NULL); + + if (tree_view->priv->tree == NULL) + return; _gtk_rbtree_traverse (tree_view->priv->tree, tree_view->priv->tree->root, @@ -8462,7 +8464,9 @@ gtk_tree_view_collapse_all (GtkTreeView *tree_view) guint *indices; g_return_if_fail (GTK_IS_TREE_VIEW (tree_view)); - g_return_if_fail (tree_view->priv->tree != NULL); + + if (tree_view->priv->tree == NULL) + return; path = gtk_tree_path_new (); gtk_tree_path_down (path);