diff options
Diffstat (limited to 'libdbusmenu-glib/client.c')
-rw-r--r-- | libdbusmenu-glib/client.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 6094eca..22f65fa 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -170,6 +170,11 @@ dbusmenu_client_dispose (GObject *object) } priv->session_bus = NULL; + if (priv->root != NULL) { + g_object_unref(G_OBJECT(priv->root)); + priv->root = NULL; + } + G_OBJECT_CLASS (dbusmenu_client_parent_class)->dispose (object); return; } @@ -388,6 +393,7 @@ parse_layout_xml(xmlNodePtr node, DbusmenuMenuitem * item, DbusmenuMenuitem * pa dbusmenu_menuitem_child_delete(parent, item); } g_object_unref(G_OBJECT(item)); + item = NULL; } if (id == 0) { @@ -404,6 +410,7 @@ parse_layout_xml(xmlNodePtr node, DbusmenuMenuitem * item, DbusmenuMenuitem * pa xmlNodePtr children; guint position; GList * oldchildren = dbusmenu_menuitem_take_children(item); + /* g_debug("Starting old children: %d", g_list_length(oldchildren)); */ for (children = node->children, position = 0; children != NULL; children = children->next, position++) { /* g_debug("Looking at child: %d", position); */ @@ -424,9 +431,11 @@ parse_layout_xml(xmlNodePtr node, DbusmenuMenuitem * item, DbusmenuMenuitem * pa dbusmenu_menuitem_child_add_position(item, childmi, position); } + /* g_debug("Stopping old children: %d", g_list_length(oldchildren)); */ GList * oldchildleft = NULL; for (oldchildleft = oldchildren; oldchildleft != NULL; oldchildleft = g_list_next(oldchildleft)) { DbusmenuMenuitem * oldmi = DBUSMENU_MENUITEM(oldchildleft->data); + g_debug("Unref'ing menu item with layout update. ID: %d", dbusmenu_menuitem_get_id(oldmi)); g_object_unref(G_OBJECT(oldmi)); } g_list_free(oldchildren); |