summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-03-01 23:02:45 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-12-10 16:14:27 -0500
commit94065c00c10eb993d7d987baf7dbbe10a0247065 (patch)
tree773544a2c8e6eae2a7e2e9c97b199ec90293c2a1
parent0b818d01767426a061ae348d360233da075cd823 (diff)
downloadglade-94065c00c10eb993d7d987baf7dbbe10a0247065.tar.gz
GladeWidget: Avoid inconsistent state during dispose
The dispose code was throwing away the list of properties without clearing out the quick-access hash table, so getters could still return already-freed property objects. This was causing the popover code to crash.
-rw-r--r--gladeui/glade-widget.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index 079b48d4..16f6421d 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -1040,6 +1040,11 @@ glade_widget_dispose (GObject *object)
g_list_free (widget->priv->properties);
widget->priv->properties = NULL;
}
+ if (widget->priv->props_hash)
+ {
+ g_hash_table_destroy (widget->priv->props_hash);
+ widget->priv->props_hash = NULL;
+ }
glade_widget_set_object (widget, NULL);