[gnome-initial-setup/85-gnome-intial-setup-segfaults-possibly-due-to-locale-related-problems: 4/6] keyboard: handle locale without country correctly
- From: Will Thompson <wjt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/85-gnome-intial-setup-segfaults-possibly-due-to-locale-related-problems: 4/6] keyboard: handle locale without country correctly
- Date: Sun, 24 Nov 2019 07:40:24 +0000 (UTC)
commit dfefb5855cbc0a8a015c9ffccf0c53e655447265
Author: Will Thompson <will willthompson co uk>
Date: Sun Nov 24 07:26:01 2019 +0000
keyboard: handle locale without country correctly
Previously, this would emit a critical when using (eg) "C.UTF-8" because
'country' is NULL.
gnome-initial-setup/pages/keyboard/cc-input-chooser.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
index 1c34ef7..07a1122 100644
--- a/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
+++ b/gnome-initial-setup/pages/keyboard/cc-input-chooser.c
@@ -417,9 +417,11 @@ get_locale_infos (CcInputChooser *chooser)
add_rows_to_list (chooser, list, INPUT_SOURCE_TYPE_XKB, id);
g_list_free (list);
- list = gnome_xkb_info_get_layouts_for_country (priv->xkb_info, country);
- add_rows_to_list (chooser, list, INPUT_SOURCE_TYPE_XKB, id);
- g_list_free (list);
+ if (country != NULL) {
+ list = gnome_xkb_info_get_layouts_for_country (priv->xkb_info, country);
+ add_rows_to_list (chooser, list, INPUT_SOURCE_TYPE_XKB, id);
+ g_list_free (list);
+ }
choose_non_extras (chooser);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]