diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-04-15 12:24:51 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-04-15 12:24:51 -0400 |
commit | 74c01ff9e3a3b00810ae69db2f2d089b68c5220a (patch) | |
tree | b5ce51ebade366975945a36fe255f6648fa77c7d | |
parent | 73a9123a86d80de23105c9367e43022e8653a0df (diff) |
Don't crash when removing nameless users0.6.9
Every person had in the beginning one only proper name, except the savages
of Mount Atlas in Barbary, which were reported to be both nameless and
dreamless.
https://bugs.freedesktop.org/show_bug.cgi?id=35872
-rw-r--r-- | src/libaccountsservice/act-user-manager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c index 4e25bf9..7202b07 100644 --- a/src/libaccountsservice/act-user-manager.c +++ b/src/libaccountsservice/act-user-manager.c @@ -732,7 +732,10 @@ remove_user (ActUserManager *manager, if (act_user_get_object_path (user) != NULL) { g_hash_table_remove (manager->priv->users_by_object_path, act_user_get_object_path (user)); } - g_hash_table_remove (manager->priv->users_by_name, act_user_get_user_name (user)); + if (act_user_get_user_name (user) != NULL) { + g_hash_table_remove (manager->priv->users_by_name, act_user_get_user_name (user)); + + } if (manager->priv->is_loaded) { g_signal_emit (manager, signals[USER_REMOVED], 0, user); |