From 53bb57465bf4747f56615242d09df562a8a2c3c7 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 6 Feb 2010 10:20:45 -0800 Subject: Reffing the connection so we ensure that we have it even when folks die. --- src/libappindicator/app-indicator.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libappindicator/app-indicator.c') 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; } -- cgit v1.2.3