aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2011-02-12 23:34:18 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2011-02-12 23:34:18 +0800
commit367509a5a70af04872a618cb2bc5d4e0b97d3370 (patch)
treec1300f0e072b137dd3dd56bbdbcbb85903883d3e /lib
parent50ccd46f8b5500a753630bd6d6cacd1f41300b78 (diff)
downloadgsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar
gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar.gz
gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar.bz2
gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar.lz
gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar.xz
gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar.zst
gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.zip
gedit-overlay: Fix a crash when overlay is detroyed
Diffstat (limited to 'lib')
-rw-r--r--lib/widgets/gedit-overlay.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/widgets/gedit-overlay.c b/lib/widgets/gedit-overlay.c
index 7cff41729..a8e8d6bfe 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