[gnome-control-center] user-accounts: fix language chooser response if language is unknown
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] user-accounts: fix language chooser response if language is unknown
- Date: Tue, 7 Oct 2014 10:13:40 +0000 (UTC)
commit 4c6ef8568db72455838625c1aed31b50772ab875
Author: Ondrej Holy <oholy redhat com>
Date: Tue Oct 7 10:49:43 2014 +0200
user-accounts: fix language chooser response if language is unknown
If language is unknown and language chooser is cancelled, panel crash
with the following error:
(gnome-control-center:24952): Gtk-CRITICAL **: gtk_list_store_get_path:
assertion 'iter->stamp == priv->stamp' failed
(gnome-control-center:24952): Gtk-CRITICAL **: gtk_list_store_get_value:
assertion 'iter_is_valid (iter, list_store)' failed
(gnome-control-center:24952): GLib-GObject-WARNING **: gtype.c:4221:
type id '0' is invalid
(gnome-control-center:24952): GLib-GObject-WARNING **:
can't peek value table for type '<invalid>' which is not currently referenced
Segmentation fault (core dumped)
https://bugzilla.gnome.org/show_bug.cgi?id=738002
panels/user-accounts/um-user-panel.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/panels/user-accounts/um-user-panel.c b/panels/user-accounts/um-user-panel.c
index 3ea3880..0d42694 100644
--- a/panels/user-accounts/um-user-panel.c
+++ b/panels/user-accounts/um-user-panel.c
@@ -842,8 +842,14 @@ language_response (GtkDialog *dialog,
lang = cc_common_language_get_current_language ();
}
}
- cc_common_language_get_iter_for_language (model, lang, &iter);
- um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (combo), &iter);
+
+ if (cc_common_language_get_iter_for_language (model, lang, &iter)) {
+ um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (combo), &iter);
+ }
+ else {
+ um_editable_combo_set_active_iter (UM_EDITABLE_COMBO (combo), NULL);
+ }
+
g_free (lang);
gtk_widget_hide (GTK_WIDGET (dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]