mirror of
https://github.com/rkd77/elinks.git
synced 2025-05-18 00:48:57 -04:00
Additional check whether LANGUAGE is not NULL.
This commit is contained in:
parent
f93d5ccd80
commit
a9c02bbf01
@ -206,10 +206,13 @@ set_language(int language)
|
|||||||
/* We never free() this, purely intentionally. */
|
/* We never free() this, purely intentionally. */
|
||||||
LANGUAGE = malloc(256);
|
LANGUAGE = malloc(256);
|
||||||
}
|
}
|
||||||
|
if (LANGUAGE) {
|
||||||
strcpy(LANGUAGE, language_to_iso639(language));
|
strcpy(LANGUAGE, language_to_iso639(language));
|
||||||
p = strchr(LANGUAGE, '-');
|
p = strchr(LANGUAGE, '-');
|
||||||
if (p)
|
if (p) {
|
||||||
*p = '_';
|
*p = '_';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Propagate the change to gettext. From the info manual. */
|
/* Propagate the change to gettext. From the info manual. */
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user