aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-06-19 12:17:00 -0500
committerCharles Kerr <charles.kerr@canonical.com>2012-06-19 12:17:00 -0500
commitfa521faf4e244ed5766a631f655eba091ba43368 (patch)
tree9c06cbfb9ea7f355fb20fce737fc12939dbe591f
parent1f028ea9d2dac631add338eff7f3e614074f48f8 (diff)
downloadayatana-indicator-session-fa521faf4e244ed5766a631f655eba091ba43368.tar.gz
ayatana-indicator-session-fa521faf4e244ed5766a631f655eba091ba43368.tar.bz2
ayatana-indicator-session-fa521faf4e244ed5766a631f655eba091ba43368.zip
take a ref on the session_dbus passed into SessionMenuMgr's constructor.
-rw-r--r--src/session-menu-mgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/session-menu-mgr.c b/src/session-menu-mgr.c
index 4964d40..3bd66fc 100644
--- a/src/session-menu-mgr.c
+++ b/src/session-menu-mgr.c
@@ -211,6 +211,7 @@ session_menu_mgr_dispose (GObject *object)
g_clear_object (&mgr->upower_proxy);
g_clear_object (&mgr->users_dbus_facade);
g_clear_object (&mgr->top_mi);
+ g_clear_object (&mgr->session_dbus);
G_OBJECT_CLASS (session_menu_mgr_parent_class)->dispose (object);
}
@@ -1143,7 +1144,7 @@ SessionMenuMgr* session_menu_mgr_new (SessionDbus * session_dbus,
{
SessionMenuMgr* mgr = g_object_new (SESSION_TYPE_MENU_MGR, NULL);
mgr->greeter_mode = greeter_mode;
- mgr->session_dbus = session_dbus;
+ mgr->session_dbus = g_object_ref (session_dbus);
build_admin_menuitems (mgr);
const guint n = g_list_length (dbusmenu_menuitem_get_children (mgr->top_mi));
mgr->user_menuitem_index = n;