diff options
author | Ted Gould <ted@gould.cx> | 2010-04-16 12:21:51 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-04-16 12:21:51 -0500 |
commit | 5c9197af26598a528f69a814462cab40a349cbc2 (patch) | |
tree | 7d03ffc19b7e7dda67505d929bba2a362284eb8c /libdbusmenu-glib/client.c | |
parent | b8e566754bb9aad78726eb46305589a286a86ec3 (diff) | |
parent | e26f80a52f0453ee7efaca86487f5e04a17fd35b (diff) | |
download | libdbusmenu-5c9197af26598a528f69a814462cab40a349cbc2.tar.gz libdbusmenu-5c9197af26598a528f69a814462cab40a349cbc2.tar.bz2 libdbusmenu-5c9197af26598a528f69a814462cab40a349cbc2.zip |
* Upstream Merge
* Only unref root if the root has changed.
Diffstat (limited to 'libdbusmenu-glib/client.c')
-rw-r--r-- | libdbusmenu-glib/client.c | 7 |
1 files changed, 2 insertions, 5 deletions
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; } |