diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2011-02-12 23:34:18 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2011-02-12 23:34:18 +0800 |
commit | 367509a5a70af04872a618cb2bc5d4e0b97d3370 (patch) | |
tree | c1300f0e072b137dd3dd56bbdbcbb85903883d3e | |
parent | 50ccd46f8b5500a753630bd6d6cacd1f41300b78 (diff) | |
download | gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar.gz gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.tar.zst gsoc2013-epiphany-367509a5a70af04872a618cb2bc5d4e0b97d3370.zip |
gedit-overlay: Fix a crash when overlay is detroyed
-rw-r--r-- | 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 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 |