[epiphany] gedit-overlay: Fix a crash when overlay is detroyed



commit 367509a5a70af04872a618cb2bc5d4e0b97d3370
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Sat Feb 12 16:34:18 2011 +0100

    gedit-overlay: Fix a crash when overlay is detroyed

 lib/widgets/gedit-overlay.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/lib/widgets/gedit-overlay.c b/lib/widgets/gedit-overlay.c
index 7cff417..a8e8d6b 100644
--- a/lib/widgets/gedit-overlay.c
+++ b/lib/widgets/gedit-overlay.c
@@ -469,14 +469,16 @@ gedit_overlay_forall (GtkContainer *overlay,
                       gpointer      callback_data)
 {
 	GeditOverlay *goverlay = GEDIT_OVERLAY (overlay);
-	GSList *l;
+	GSList *children;
 
-	for (l = goverlay->priv->children; l != NULL; l = g_slist_next (l))
-	{
-		GtkWidget *child = GTK_WIDGET (l->data);
+        children = goverlay->priv->children;
+        while (children)
+        {
+                GtkWidget *child = GTK_WIDGET (children->data);
+                children = children->next;
 
-		(* callback) (child, callback_data);
-	}
+                (* callback) (child, callback_data);
+        }
 }
 
 static GType



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]