diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/app-menu-item.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app-menu-item.c b/src/app-menu-item.c index c769d47..56b3ec5 100644 --- a/src/app-menu-item.c +++ b/src/app-menu-item.c @@ -131,6 +131,8 @@ app_menu_item_finalize (GObject *object) g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener), G_CALLBACK(indicator_added_cb), self); g_signal_handlers_disconnect_by_func(G_OBJECT(priv->listener), G_CALLBACK(indicator_removed_cb), self); + g_object_unref(priv->listener); + G_OBJECT_CLASS (app_menu_item_parent_class)->finalize (object); return; @@ -144,7 +146,9 @@ app_menu_item_new (IndicateListener * listener, IndicateListenerServer * server) AppMenuItemPrivate * priv = APP_MENU_ITEM_GET_PRIVATE(self); priv->listener = listener; + g_object_ref(G_OBJECT(listener)); priv->server = server; + /* Can not ref as not real GObject */ g_signal_connect(G_OBJECT(listener), INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_CALLBACK(indicator_added_cb), self); g_signal_connect(G_OBJECT(listener), INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_CALLBACK(indicator_removed_cb), self); |