From: Bruno Haible Date: Sat, 27 Apr 2019 18:26:43 +0000 (+0200) Subject: Update after gnulib changed. X-Git-Tag: v0.20~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd257ae6f80c2c27398026972c81ac0a2e00ef38;p=thirdparty%2Fgettext.git Update after gnulib changed. --- diff --git a/gettext-runtime/intl/localename.c b/gettext-runtime/intl/localename.c index 1cb0a90f0..1b1bb19bb 100644 --- a/gettext-runtime/intl/localename.c +++ b/gettext-runtime/intl/localename.c @@ -3294,15 +3294,16 @@ gl_locale_name_posix (int category, const char *categoryname) /* Convert the locale name from the format returned by setlocale() or found in the environment variables to the XPG syntax. */ #if defined WINDOWS_NATIVE - { - /* Convert locale name to LCID. We don't want to use - LocaleNameToLCID because (a) it is only available since Vista, - and (b) it doesn't accept locale names returned by 'setlocale'. */ - LCID lcid = get_lcid (locname); + if (locname != NULL) + { + /* Convert locale name to LCID. We don't want to use + LocaleNameToLCID because (a) it is only available since Vista, + and (b) it doesn't accept locale names returned by 'setlocale'. */ + LCID lcid = get_lcid (locname); - if (lcid > 0) - return gl_locale_name_from_win32_LCID (lcid); - } + if (lcid > 0) + return gl_locale_name_from_win32_LCID (lcid); + } #endif return locname; }