From 25ab785826d59d8ca7860b0d0bc39d6187a3a1ed Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 24 Jan 2011 14:56:07 -0600 Subject: Fixing referencing warnings on destruction. --- libdbusmenu-gtk/parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libdbusmenu-gtk/parser.c') diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index cfce42a..52bd8a8 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -88,7 +88,9 @@ dbusmenu_gtk_parse_menu_structure (GtkWidget * widget) static void dbusmenu_cache_freed (gpointer data, GObject * obj) { - g_object_set_data(G_OBJECT(data), CACHED_MENUITEM, NULL); + /* If the dbusmenu item is killed we don't need to remove + the weak ref as well. */ + g_object_steal_data(G_OBJECT(data), CACHED_MENUITEM); return; } -- cgit v1.2.3