aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app-menu-item.c1
-rw-r--r--src/indicator-service.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c
index f973e33..2212be5 100644
--- a/src/app-menu-item.c
+++ b/src/app-menu-item.c
@@ -257,6 +257,7 @@ activate_cb (AppMenuItem * self, gpointer data)
static void
indicator_added_cb (IndicateListener * listener, IndicateListenerServer * server, IndicateListenerIndicator * indicator, gchar * type, gpointer data)
{
+ g_return_if_fail(IS_APP_MENU_ITEM(data));
AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(data);
if (g_strcmp0(INDICATE_LISTENER_SERVER_DBUS_NAME(server), INDICATE_LISTENER_SERVER_DBUS_NAME(priv->server))) {
diff --git a/src/indicator-service.c b/src/indicator-service.c
index 77d42e6..cb7e23a 100644
--- a/src/indicator-service.c
+++ b/src/indicator-service.c
@@ -255,6 +255,7 @@ server_removed (IndicateListener * listener, IndicateListenerServer * server, gc
if (sltp->menuitem != NULL) {
dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(sltp->menuitem), "visibile", "false");
dbusmenu_menuitem_child_delete(DBUSMENU_MENUITEM(data), DBUSMENU_MENUITEM(sltp->menuitem));
+ g_object_unref(G_OBJECT(sltp->menuitem));
}
g_free(sltp);