[gnome-initial-setup] account: Fix segfault on no permission to access accountservice.



commit 4a1e102da88e27d4b9e63de728a6fb0a810ae9e6
Author: Michael Wood <michael g wood intel com>
Date:   Mon Jun 17 18:02:07 2013 +0100

    account: Fix segfault on no permission to access accountservice.
    
    act_user can be NULL if permission denied, or account setup fails
    Mostly affects testing mode (--force-new-user).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702493

 .../pages/account/gis-account-page.c               |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c 
b/gnome-initial-setup/pages/account/gis-account-page.c
index 411f820..ae95f59 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -436,7 +436,7 @@ confirm_entry_focus_out (GtkWidget      *widget,
   return FALSE;
 }
 
-static void
+static gboolean
 create_user (GisAccountPage *page)
 {
   GisAccountPagePrivate *priv = page->priv;
@@ -458,7 +458,9 @@ create_user (GisAccountPage *page)
   if (error != NULL) {
     g_warning ("Failed to create user: %s", error->message);
     g_error_free (error);
+    return FALSE;
   }
+  return TRUE;
 }
 
 static void
@@ -504,7 +506,8 @@ local_create_user (GisAccountPage *page)
 {
   GisAccountPagePrivate *priv = page->priv;
 
-  create_user (page);
+  if (create_user (page) == FALSE)
+    return;
 
   if (act_user_is_loaded (priv->act_user))
     save_user_data (page);


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