[gtk+] Fixed GtkGrid GtkContainerClass->forall() to not use a for loop.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fixed GtkGrid GtkContainerClass->forall() to not use a for loop.
- Date: Wed, 22 Dec 2010 12:20:06 +0000 (UTC)
commit e20503836c3d91d52eb0448ebb34f599d7b87300
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Wed Dec 22 21:21:44 2010 +0900
Fixed GtkGrid GtkContainerClass->forall() to not use a for loop.
This loop needs to be safe for removing children in a forall loop.
gtk/gtkgrid.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 7aaf8ef..3557c16 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -439,9 +439,11 @@ gtk_grid_forall (GtkContainer *container,
GtkGridChild *child;
GList *list;
- for (list = priv->children; list; list = list->next)
+ list = priv->children;
+ while (list)
{
child = list->data;
+ list = list->next;
(* callback) (child->widget, callback_data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]