[glade/popover] GladeWidget: Avoid inconsistent state during dispose
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade/popover] GladeWidget: Avoid inconsistent state during dispose
- Date: Mon, 2 Mar 2015 04:04:05 +0000 (UTC)
commit 9af35fb10d431d8042b64fee22b26446bd6b961d
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Mar 1 23:02:45 2015 -0500
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.
gladeui/glade-widget.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index 079b48d..16f6421 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]