aboutsummaryrefslogtreecommitdiff
path: root/src/user-menu-mgr.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-04 17:25:19 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-04 17:25:19 +0100
commitc1ee13d61894607f7e916d1041c1db0b2c99c93a (patch)
tree8e230777968b1a78e2dab39649f6604fe2d239f3 /src/user-menu-mgr.c
parent5ba9266a7798e03013af14d4e5003725151e665e (diff)
downloadayatana-indicator-session-c1ee13d61894607f7e916d1041c1db0b2c99c93a.tar.gz
ayatana-indicator-session-c1ee13d61894607f7e916d1041c1db0b2c99c93a.tar.bz2
ayatana-indicator-session-c1ee13d61894607f7e916d1041c1db0b2c99c93a.zip
trace around this seg fault
Diffstat (limited to 'src/user-menu-mgr.c')
-rw-r--r--src/user-menu-mgr.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c
index 611bcc7..bf3b77f 100644
--- a/src/user-menu-mgr.c
+++ b/src/user-menu-mgr.c
@@ -149,10 +149,9 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self)
for (u = users; u != NULL; u = g_list_next (u)) {
user = u->data;
+ g_debug ("%p: %s", user, user->real_name);
user->service = self->users_dbus_interface;
- g_debug ("%i %s", (gint)user->uid, user->user_name);
-
if (g_strcmp0(user->user_name, "guest") == 0) {
/* Check to see if the guest has sessions and so therefore should
get a check mark. */
@@ -171,13 +170,26 @@ user_menu_mgr_rebuild_items (UserMenuMgr *self)
if (self->user_count > MINIMUM_USERS && self->user_count < MAXIMUM_USERS) {
mi = dbusmenu_menuitem_new ();
- dbusmenu_menuitem_property_set (mi, DBUSMENU_MENUITEM_PROP_TYPE, USER_ITEM_TYPE);
+ dbusmenu_menuitem_property_set (mi,
+ DBUSMENU_MENUITEM_PROP_TYPE,
+ USER_ITEM_TYPE);
if (user->real_name_conflict) {
gchar * conflictedname = g_strdup_printf("%s (%s)", user->real_name, user->user_name);
dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, conflictedname);
g_free(conflictedname);
} else {
- dbusmenu_menuitem_property_set (mi, USER_ITEM_PROP_NAME, user->real_name);
+ //g_debug ("%i %s", (gint)user->uid, user->real_name);
+ //g_debug ("users uid = %i", (gint)user->uid);
+ //g_debug ("users real name = %s", user->real_name);
+ if (user == NULL){
+ g_debug ("USER pointer is NULL");
+ return;
+ }
+ g_debug ("%p: %s", user, user->real_name);
+
+ dbusmenu_menuitem_property_set (mi,
+ USER_ITEM_PROP_NAME,
+ user->real_name);
}
dbusmenu_menuitem_property_set_bool (mi,
USER_ITEM_PROP_LOGGED_IN,