summaryrefslogtreecommitdiff
path: root/gtk/gtktree.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>2000-07-11 06:08:24 +0000
committerTim Janik <timj@src.gnome.org>2000-07-11 06:08:24 +0000
commitfc5ee9256d7b16abf0ec49319daeca59752d1cb2 (patch)
treeec7e444bed2cdea3700125bb8719c2553071e135 /gtk/gtktree.c
parent64911ddc44c775e61afe8c6593fc063f427c6927 (diff)
downloadgdk-pixbuf-fc5ee9256d7b16abf0ec49319daeca59752d1cb2.tar.gz
eek, i've never seen a bug here, never been here and never fixed anything
Tue Jul 11 08:04:58 2000 Tim Janik <timj@gtk.org> * gtk/gtktree.c (gtk_real_tree_select_child): eek, i've never seen a bug here, never been here and never fixed anything ;( (don't segfault if tree->root_tree is NULL, which happens prior to widget realization, but puke instead).
Diffstat (limited to 'gtk/gtktree.c')
-rw-r--r--gtk/gtktree.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtktree.c b/gtk/gtktree.c
index 40c9fd79e..a549e0e41 100644
--- a/gtk/gtktree.c
+++ b/gtk/gtktree.c
@@ -1057,6 +1057,12 @@ gtk_real_tree_select_child (GtkTree *tree,
g_return_if_fail (GTK_IS_TREE (tree));
g_return_if_fail (child != NULL);
g_return_if_fail (GTK_IS_TREE_ITEM (child));
+
+ if (!tree->root_tree)
+ {
+ g_warning (G_STRLOC ": unable to select a child in a tree prior to realization");
+ return;
+ }
root_selection = tree->root_tree->selection;