aboutsummaryrefslogtreecommitdiff
path: root/src/libappindicator
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-06 10:20:45 -0800
committerTed Gould <ted@gould.cx>2010-02-06 10:20:45 -0800
commit53bb57465bf4747f56615242d09df562a8a2c3c7 (patch)
tree47faf8462f54c7637960b487d11248867187f51b /src/libappindicator
parentf8ab455538c130ce03132e2557c9363e9a808156 (diff)
downloadayatana-indicator-application-53bb57465bf4747f56615242d09df562a8a2c3c7.tar.gz
ayatana-indicator-application-53bb57465bf4747f56615242d09df562a8a2c3c7.tar.bz2
ayatana-indicator-application-53bb57465bf4747f56615242d09df562a8a2c3c7.zip
Reffing the connection so we ensure that we have it even when folks die.
Diffstat (limited to 'src/libappindicator')
-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;
}