[glade3] * gladeui/glade-project.c: Fix glade_project_fix_object_props() to copy the list which risks cha
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade3] * gladeui/glade-project.c: Fix glade_project_fix_object_props() to copy the list which risks cha
- Date: Wed, 15 Dec 2010 17:00:03 +0000 (UTC)
commit d5a6041cdd691414e4b11d0543fe54df9cdbe29b
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Thu Dec 16 02:04:06 2010 +0900
* gladeui/glade-project.c: Fix glade_project_fix_object_props() to copy the
list which risks changing order while iterating.
ChangeLog | 3 +++
gladeui/glade-project.c | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c82e2b2..48e040a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,9 @@
* gladeui/glade-utils.c: Fixed crasher bug 628233 partially using patch by
ramz <ramanathan nitt gmail com>.
+ * gladeui/glade-project.c: Fix glade_project_fix_object_props() to copy the
+ list which risks changing order while iterating.
+
2010-12-14 Tristan Van Berkom <tristanvb openismus com>
* Reverted 3.0 commit, now targetting this branch to the final GTK+ 2.x chapter
diff --git a/gladeui/glade-project.c b/gladeui/glade-project.c
index 28ade78..1604f07 100644
--- a/gladeui/glade-project.c
+++ b/gladeui/glade-project.c
@@ -963,13 +963,14 @@ glade_project_new (void)
static void
glade_project_fix_object_props (GladeProject *project)
{
- GList *l, *ll;
+ GList *l, *ll, *objects;
GValue *value;
GladeWidget *gwidget;
GladeProperty *property;
gchar *txt;
- for (l = project->priv->objects; l; l = l->next)
+ objects = g_list_copy (project->priv->objects);
+ for (l = objects; l; l = l->next)
{
gwidget = glade_widget_get_from_gobject (l->data);
@@ -998,6 +999,7 @@ glade_project_fix_object_props (GladeProject *project)
}
}
}
+ g_list_free (objects);
}
static gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]