1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

Additional check whether LANGUAGE is not NULL.

This commit is contained in:
Witold Filipczyk 2010-09-19 15:29:55 +02:00 committed by witekfl
parent f93d5ccd80
commit a9c02bbf01

View File

@ -206,10 +206,13 @@ set_language(int language)
/* We never free() this, purely intentionally. */
LANGUAGE = malloc(256);
}
strcpy(LANGUAGE, language_to_iso639(language));
p = strchr(LANGUAGE, '-');
if (p)
*p = '_';
if (LANGUAGE) {
strcpy(LANGUAGE, language_to_iso639(language));
p = strchr(LANGUAGE, '-');
if (p) {
*p = '_';
}
}
/* Propagate the change to gettext. From the info manual. */
{