Don't assume widgets are containers when walking the focus tree

This causes problems for links in labels.
This commit is contained in:
William Jon McCann 2010-10-08 19:26:01 -04:00
parent 6c537bd0bf
commit f8b573766d

View File

@ -1867,7 +1867,7 @@ gtk_container_real_set_focus_child (GtkContainer *container,
{
focus_child = priv->focus_child;
while (gtk_container_get_focus_child (GTK_CONTAINER (focus_child)))
while (GTK_IS_CONTAINER (focus_child) && gtk_container_get_focus_child (GTK_CONTAINER (focus_child)))
{
focus_child = gtk_container_get_focus_child (GTK_CONTAINER (focus_child));
}