[gnome-initial-setup] account: Don't crash if we don't have a language set
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] account: Don't crash if we don't have a language set
- Date: Tue, 30 Apr 2013 14:46:37 +0000 (UTC)
commit c31efd3f8ae844af5a108e8af0c2a308b7ef1c15
Author: Colin Walters <walters verbum org>
Date: Tue Apr 30 09:13:32 2013 -0400
account: Don't crash if we don't have a language set
This can at the moment happen if the user skips past the screen.
https://bugzilla.gnome.org/show_bug.cgi?id=699308
.../pages/account/gis-account-page.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c
b/gnome-initial-setup/pages/account/gis-account-page.c
index ed0d20e..0e5fecd 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -436,6 +436,7 @@ create_user (GisAccountPage *page)
GisAccountPagePrivate *priv = page->priv;
const gchar *username;
const gchar *fullname;
+ const gchar *language;
GError *error;
username = gtk_combo_box_text_get_active_text (OBJ(GtkComboBoxText*, "account-username-combo"));
@@ -444,7 +445,9 @@ create_user (GisAccountPage *page)
error = NULL;
priv->act_user = act_user_manager_create_user (priv->act_client, username, fullname, priv->account_type,
&error);
- act_user_set_language (priv->act_user, gis_driver_get_user_language (GIS_PAGE (page)->driver));
+ language = gis_driver_get_user_language (GIS_PAGE (page)->driver);
+ if (language)
+ act_user_set_language (priv->act_user, language);
if (error != NULL) {
g_warning ("Failed to create user: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]