From: Art Cancro Date: Wed, 25 Feb 2009 17:06:23 +0000 (+0000) Subject: * Added a null pointer check to the 'language' variable to prevent crash X-Git-Tag: v7.86~1408 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6a0e6d38dabb90ae15c0c78fcaea387ca39700c2 * Added a null pointer check to the 'language' variable to prevent crash --- diff --git a/webcit/gettext.c b/webcit/gettext.c index d14ecada1..917ee4bd3 100644 --- a/webcit/gettext.c +++ b/webcit/gettext.c @@ -238,7 +238,7 @@ void preset_locale(void) char *language; language = getenv("WEBCIT_LANG"); - if (!IsEmptyStr(language) && (strcmp(language, "UNLIMITED") != 0)) { + if ((language) && (!IsEmptyStr(language)) && (strcmp(language, "UNLIMITED") != 0)) { lprintf(9, "Nailing locale to %s\n", language); setlocale(LC_MESSAGES, language); }