aboutsummaryrefslogtreecommitdiff
path: root/src/users-service-dbus.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-17 15:20:21 -0500
committerTed Gould <ted@gould.cx>2010-03-17 15:20:21 -0500
commit1d79b928f9df7e3185ba5846b06f3c7675ba4fea (patch)
treec5a23552dd4717caf05a8b1b4fb3922e02af9064 /src/users-service-dbus.c
parent8ab1eb8c5cb2e0c64681e473131b957818a74d82 (diff)
downloadayatana-indicator-session-1d79b928f9df7e3185ba5846b06f3c7675ba4fea.tar.gz
ayatana-indicator-session-1d79b928f9df7e3185ba5846b06f3c7675ba4fea.tar.bz2
ayatana-indicator-session-1d79b928f9df7e3185ba5846b06f3c7675ba4fea.zip
Some debugging an checking to ensure the menu item is not NULL
Diffstat (limited to 'src/users-service-dbus.c')
-rw-r--r--src/users-service-dbus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index d581887..86007c3 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -609,6 +609,7 @@ seat_proxy_session_added (DBusGProxy *seat_proxy,
dbusmenu_menuitem_property_set_bool(priv->guest_item, USER_ITEM_PROP_LOGGED_IN, TRUE);
}
priv->guest_session_id = g_strdup(session_id);
+ g_debug("Found guest session: %s", priv->guest_session_id);
return;
}
@@ -634,7 +635,10 @@ seat_proxy_session_removed (DBusGProxy *seat_proxy,
username = g_hash_table_lookup (priv->sessions, session_id);
if (!username) {
if (g_strcmp0(session_id, priv->guest_session_id) == 0) {
- dbusmenu_menuitem_property_set_bool(priv->guest_item, USER_ITEM_PROP_LOGGED_IN, FALSE);
+ g_debug("Removing guest session: %s", priv->guest_session_id);
+ if (priv->guest_item != NULL) {
+ dbusmenu_menuitem_property_set_bool(priv->guest_item, USER_ITEM_PROP_LOGGED_IN, FALSE);
+ }
g_free(priv->guest_session_id);
priv->guest_session_id = NULL;
}