aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libappindicator/app-indicator.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libappindicator/app-indicator.c b/src/libappindicator/app-indicator.c
index 908684f..8d07861 100644
--- a/src/libappindicator/app-indicator.c
+++ b/src/libappindicator/app-indicator.c
@@ -330,6 +330,7 @@ app_indicator_init (AppIndicator *self)
g_error_free(error);
return;
}
+ dbus_g_connection_ref(priv->connection);
dbus_g_connection_register_g_object(priv->connection,
DEFAULT_ITEM_PATH,
@@ -386,6 +387,11 @@ app_indicator_dispose (GObject *object)
priv->watcher_proxy = NULL;
}
+ if (priv->connection != NULL) {
+ dbus_g_connection_unref(priv->connection);
+ priv->connection = NULL;
+ }
+
G_OBJECT_CLASS (app_indicator_parent_class)->dispose (object);
return;
}