From 48acc41698f21a122f5f920d171fd120218acd35 Mon Sep 17 00:00:00 2001 From: Ionut Biru Date: Mon, 9 May 2011 13:03:17 -0700 Subject: [PATCH] Don't crash when removing nameless user https://bugzilla.gnome.org/show_bug.cgi?id=647893 --- src/gdmuser/gdm-user-manager.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gdmuser/gdm-user-manager.c b/src/gdmuser/gdm-user-manager.c index eba9da11e..e7ca83314 100644 --- a/src/gdmuser/gdm-user-manager.c +++ b/src/gdmuser/gdm-user-manager.c @@ -777,7 +777,10 @@ remove_user (GdmUserManager *manager, if (gdm_user_get_object_path (user) != NULL) { g_hash_table_remove (manager->priv->users_by_object_path, gdm_user_get_object_path (user)); } - g_hash_table_remove (manager->priv->users_by_name, gdm_user_get_user_name (user)); + + if (gdm_user_get_user_name (user) != NULL) { + g_hash_table_remove (manager->priv->users_by_name, gdm_user_get_user_name (user)); + } if (manager->priv->is_loaded) { g_signal_emit (manager, signals[USER_REMOVED], 0, user);