After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738963 - region: don't crash for locales with no country_code
region: don't crash for locales with no country_code
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Region & Language
unspecified
Other All
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-21 21:06 UTC by Cosimo Cecchi
Modified: 2014-10-22 22:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
region: don't crash for locales with no country_code (1.22 KB, patch)
2014-10-21 21:06 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2014-10-21 21:06:05 UTC
See attached patch
Comment 1 Cosimo Cecchi 2014-10-21 21:06:08 UTC
Created attachment 289077 [details] [review]
region: don't crash for locales with no country_code

gnome_parse_locale() can return an empty country_code for some locales,
which we are not taking into account when building the simple_locale
string.
Comment 2 Rui Matos 2014-10-22 13:21:14 UTC
Review of attachment 289077 [details] [review]:

A bit further down we do gnome_xkb_info_get_layouts_for_country() with country_code, so we should also skip that part in case country_code is NULL. With that, looks good
Comment 3 Cosimo Cecchi 2014-10-22 22:48:40 UTC
Pushed with that change, thanks.

Attachment 289077 [details] pushed as 422166f - region: don't crash for locales with no country_code