diff options
author | Ted Gould <ted@gould.cx> | 2010-03-31 09:00:09 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-03-31 09:00:09 -0500 |
commit | d3d5ee8f0f10346f7d19aceb1b59e935bbfe162e (patch) | |
tree | a34a878e870d6184f5b8344b0e130cec632e9892 /libdbusmenu-glib/client.c | |
parent | 2f5faa5dfaef3da5c42b5c7494bf30d98ecba992 (diff) | |
parent | 69f2190a6e57920e6086013c87cea5cc1734abcb (diff) | |
download | libdbusmenu-d3d5ee8f0f10346f7d19aceb1b59e935bbfe162e.tar.gz libdbusmenu-d3d5ee8f0f10346f7d19aceb1b59e935bbfe162e.tar.bz2 libdbusmenu-d3d5ee8f0f10346f7d19aceb1b59e935bbfe162e.zip |
* Upstream merge
* Making an unref more accessible
Diffstat (limited to 'libdbusmenu-glib/client.c')
-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; } |