[gnome-shell] Don't crash when removing nameless user
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Don't crash when removing nameless user
- Date: Thu, 19 May 2011 16:07:35 +0000 (UTC)
commit 48acc41698f21a122f5f920d171fd120218acd35
Author: Ionut Biru <ibiru archlinux org>
Date: Mon May 9 13:03:17 2011 -0700
Don't crash when removing nameless user
https://bugzilla.gnome.org/show_bug.cgi?id=647893
src/gdmuser/gdm-user-manager.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gdmuser/gdm-user-manager.c b/src/gdmuser/gdm-user-manager.c
index eba9da1..e7ca833 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]