diff options
author | Tristan Van Berkom <tvb@src.gnome.org> | 2009-03-23 00:48:29 +0000 |
---|---|---|
committer | Tristan Van Berkom <tvb@src.gnome.org> | 2009-03-23 00:48:29 +0000 |
commit | 708b5afc203bf5d5721164462a681ea0f6535aab (patch) | |
tree | bb6fc374c26c7a6eaa7bae32c403148f4994245b | |
parent | 8f28813497d549d57067cec66d3cab7025657288 (diff) | |
download | glade-708b5afc203bf5d5721164462a681ea0f6535aab.tar.gz |
Fix broken hash table maintenence in glade_widget_remove_property() (bug
* gladeui/glade-widget.c: Fix broken hash table maintenence in
glade_widget_remove_property() (bug 575885).
svn path=/trunk/; revision=2177
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gladeui/glade-widget.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -2,7 +2,10 @@ * gladeui/glade-command.c: Fix win32 crasher (bug 575206) again (seems I missed it was klass->name that was null, fixed it so it would never - be null, and added g_assert() where the crash was + be null, and added g_assert() where the crash was. + + * gladeui/glade-widget.c: Fix broken hash table maintenence in + glade_widget_remove_property() (bug 575885). 2009-03-21 Tristan Van Berkom <tvb@gnome.org> diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c index 481558b5..acb2c85f 100644 --- a/gladeui/glade-widget.c +++ b/gladeui/glade-widget.c @@ -622,9 +622,14 @@ glade_widget_remove_property (GladeWidget *widget, g_return_if_fail (GLADE_IS_WIDGET (widget)); g_return_if_fail (id_property); + /* XXX FIXME: currently we arent calling this on packing properties, + * but doing so could cause crashes because the hash table is not + * managed properly + */ if ((prop = glade_widget_get_property (widget, id_property)) != NULL) { widget->properties = g_list_remove (widget->properties, prop); + g_hash_table_remove (widget->props_hash, prop->klass->id); g_object_unref (prop); } else |