Fix another GtkFixed regression, in gtk_fixed_forall()

b3f6f67c changed the loop from while() to for() in gtk_fixed_forall(),
but that's wrong since the callback can have side-effects on the list,
in case the current child gets removed. And that's the case when the
widget is destroyed.

Patch by Vincent Untz
https://bugzilla.gnome.org/show_bug.cgi?id=641196
This commit is contained in:
Matthias Clasen 2011-02-02 00:40:02 -05:00
parent 0ade265a69
commit 54c97f3ba2

View File

@ -540,9 +540,11 @@ gtk_fixed_forall (GtkContainer *container,
GtkFixedChild *child;
GList *children;
for (children = priv->children; children; children = children->next)
children = priv->children;
while (children)
{
child = children->data;
children = children->next;
(* callback) (child->widget, callback_data);
}