[libegg] Fixed EggWrapBox GtkContainer:forall() implementation



commit 977d7d6fb766dd49b935c598754be7d757debd5c
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Wed Nov 10 13:23:42 2010 +0900

    Fixed EggWrapBox GtkContainer:forall() implementation
    
    Now it's safe at destroy time where widgets are removed from
    their container from a call to gtk_container_foreach () (same
    treatment that was given to EggSpreadTable).

 libegg/wrapbox/eggwrapbox.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libegg/wrapbox/eggwrapbox.c b/libegg/wrapbox/eggwrapbox.c
index da3e4b2..08618f0 100644
--- a/libegg/wrapbox/eggwrapbox.c
+++ b/libegg/wrapbox/eggwrapbox.c
@@ -1459,9 +1459,12 @@ egg_wrap_box_forall (GtkContainer *container,
   EggWrapBoxChild   *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]