From e26f80a52f0453ee7efaca86487f5e04a17fd35b Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 16 Apr 2010 12:21:02 -0500 Subject: Now that we're not reffing the root locally, we need to only unref it if we're changing roots --- libdbusmenu-glib/client.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libdbusmenu-glib') diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 3df5c6a..d2ba541 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -873,17 +873,14 @@ parse_layout (DbusmenuClient * client, const gchar * layout) clean up that old root */ if (oldroot != NULL) { dbusmenu_menuitem_set_root(oldroot, FALSE); + g_object_unref(oldroot); + oldroot = NULL; } /* If the root changed we can signal that */ g_signal_emit(G_OBJECT(client), signals[ROOT_CHANGED], 0, priv->root, TRUE); } - /* We need to unref it in this function no matter */ - if (oldroot != NULL) { - g_object_unref(oldroot); - } - return 1; } -- cgit v1.2.3