[accounts-dialog] Don't segfault if um_user_new_from_object_path() fails for any reason



commit fd836a05049c848b6bcd22d496bffee8c62bb7b1
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jan 22 15:11:15 2010 +0000

    Don't segfault if um_user_new_from_object_path() fails for any reason

 src/um-user-manager.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/um-user-manager.c b/src/um-user-manager.c
index 7e54487..4644d6d 100644
--- a/src/um-user-manager.c
+++ b/src/um-user-manager.c
@@ -123,6 +123,8 @@ user_added_handler (DBusGProxy *proxy,
                 return;
 
         user = um_user_new_from_object_path (object_path);
+        if (!user)
+                return;
         g_signal_connect (user, "changed",
                           G_CALLBACK (user_changed_handler), manager);
         g_hash_table_insert (manager->user_by_object_path, (gpointer)um_user_get_object_path (user), g_object_ref (user));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]