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);