Don't crash when removing nameless user

https://bugzilla.gnome.org/show_bug.cgi?id=647893
This commit is contained in:
Ionut Biru 2011-05-09 13:03:17 -07:00 committed by Dan Winship
parent 17672accfe
commit 48acc41698

View File

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