From b0af2cb938c23b980bd39ec3094d6d04e0996e25 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 7 Mar 2011 10:48:13 -0600 Subject: Steal earlier instead of later so that signal handlers don't find the value in the hashtable --- libdbusmenu-glib/menuitem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libdbusmenu-glib/menuitem.c') diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 8534370..950889b 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -1215,6 +1215,7 @@ dbusmenu_menuitem_property_set_variant (DbusmenuMenuitem * mi, const gchar * pro it) after the signal emition */ remove = TRUE; replaced = TRUE; + g_hash_table_steal(priv->properties, property); } } @@ -1235,7 +1236,8 @@ dbusmenu_menuitem_property_set_variant (DbusmenuMenuitem * mi, const gchar * pro } if (remove) { - g_hash_table_remove(priv->properties, property); + g_free(hash_key); + g_variant_unref(hash_variant); } return TRUE; -- cgit v1.2.3