3675f224a75fedebddd24378a3745b617fe467b6
diff --git a/gtk/gtkstatusbar.c b/gtk/gtkstatusbar.c
index 9fd2154..d869417 100644
--- a/gtk/gtkstatusbar.c
+++ b/gtk/gtkstatusbar.c
@@ -829,14 +829,9 @@ has_extra_children (GtkStatusbar *statusbar)
   if (gtk_bin_get_child (GTK_BIN (statusbar->frame)) != statusbar->label)
     return TRUE;
 
-  frame = NULL;
-  for (l = GTK_BOX (statusbar)->children; l; l = l->next)
-    {
-      frame = l->data;
-
-      if (frame->widget == statusbar->frame)
-	break;
-    }
+  l = g_list_find (GTK_BOX (statusbar)->children, statusbar->frame);
+  g_return_val_if_fail (l != NULL, FALSE);
+  frame = (GtkBoxChild*)l->data;
   
   for (l = l->next; l; l = l->next)
     {
