diff options
author | Ted Gould <ted@gould.cx> | 2010-04-16 12:21:02 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-04-16 12:21:02 -0500 |
commit | e26f80a52f0453ee7efaca86487f5e04a17fd35b (patch) | |
tree | 9d1e8ad26b161e35dddff3da4e41e060836fcb79 | |
parent | e45ecac9a2dad70c782c33e8d2f9b3ce295238a3 (diff) | |
download | libdbusmenu-e26f80a52f0453ee7efaca86487f5e04a17fd35b.tar.gz libdbusmenu-e26f80a52f0453ee7efaca86487f5e04a17fd35b.tar.bz2 libdbusmenu-e26f80a52f0453ee7efaca86487f5e04a17fd35b.zip |
Now that we're not reffing the root locally, we need to only unref it if we're changing roots
-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; } |