blob: 4aa5d3c7a1a5c0a4d94cadd7bfad6e7b7a787dce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From 54c97f3ba2358c60fcc32404b67716e44384fb52 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Wed, 2 Feb 2011 00:40:02 -0500
Subject: [PATCH 1/2] Fix another GtkFixed regression, in gtk_fixed_forall()
b3f6f67c changed the loop from while() to for() in gtk_fixed_forall(),
but that's wrong since the callback can have side-effects on the list,
in case the current child gets removed. And that's the case when the
widget is destroyed.
Patch by Vincent Untz
https://bugzilla.gnome.org/show_bug.cgi?id=641196
---
gtk/gtkfixed.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
index fd92cd7..e453005 100644
--- a/gtk/gtkfixed.c
+++ b/gtk/gtkfixed.c
@@ -540,9 +540,11 @@ gtk_fixed_forall (GtkContainer *container,
GtkFixedChild *child;
GList *children;
- for (children = priv->children; children; children = children->next)
+ children = priv->children;
+ while (children)
{
child = children->data;
+ children = children->next;
(* callback) (child->widget, callback_data);
}
--
1.7.3.5
|