aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-12-08 10:03:28 -0600
committerTed Gould <ted@gould.cx>2010-12-08 10:03:28 -0600
commitb9d669083f761e75c4c62b23055ca5e103cd8a2c (patch)
tree9072a5a504e92797105c5d5f975ccf379761e80a /src
parent4a94c8c8c2756fb91164b35ecc767a90f1c61a25 (diff)
downloadlibayatana-appindicator-b9d669083f761e75c4c62b23055ca5e103cd8a2c.tar.gz
libayatana-appindicator-b9d669083f761e75c4c62b23055ca5e103cd8a2c.tar.bz2
libayatana-appindicator-b9d669083f761e75c4c62b23055ca5e103cd8a2c.zip
Making sure to ref the object when doing the async callback.
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 3ecf9c5..99c7fed 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -543,6 +543,7 @@ app_indicator_init (AppIndicator *self)
priv->shorties = NULL;
/* Start getting the session bus */
+ g_object_ref(self); /* ref for the bus creation callback */
g_bus_get(G_BUS_TYPE_SESSION, NULL, bus_creation, self);
g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()),
@@ -895,6 +896,9 @@ bus_creation (GObject * obj, GAsyncResult * res, gpointer user_data)
/* If the connection was blocking the exporting of the
object this function will export everything. */
check_connect(app);
+
+ g_object_unref(G_OBJECT(app));
+
return;
}