From fc5ee9256d7b16abf0ec49319daeca59752d1cb2 Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Tue, 11 Jul 2000 06:08:24 +0000 Subject: eek, i've never seen a bug here, never been here and never fixed anything Tue Jul 11 08:04:58 2000 Tim Janik * 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). --- gtk/gtktree.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gtk') diff --git a/gtk/gtktree.c b/gtk/gtktree.c index 40c9fd79e2..a549e0e41a 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; -- cgit v1.2.1