From b9d669083f761e75c4c62b23055ca5e103cd8a2c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 8 Dec 2010 10:03:28 -0600 Subject: Making sure to ref the object when doing the async callback. --- src/app-indicator.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit v1.2.3