diff options
author | Ted Gould <ted@gould.cx> | 2010-03-31 08:59:36 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-31 08:59:36 -0500 |
commit | 69f2190a6e57920e6086013c87cea5cc1734abcb (patch) | |
tree | 24b7affff076e84ad531f1f796562e530cfe9fa8 /libdbusmenu-glib | |
parent | 4d34ef26ed23a32ba777d1049a6fa6de88750516 (diff) | |
download | libdbusmenu-69f2190a6e57920e6086013c87cea5cc1734abcb.tar.gz libdbusmenu-69f2190a6e57920e6086013c87cea5cc1734abcb.tar.bz2 libdbusmenu-69f2190a6e57920e6086013c87cea5cc1734abcb.zip |
Unreffing always when updating.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index ae4b2f9..fb2a2bc 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -802,13 +802,17 @@ 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); } /* 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; } |