From 6a0e6d38dabb90ae15c0c78fcaea387ca39700c2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 25 Feb 2009 17:06:23 +0000 Subject: [PATCH] * Added a null pointer check to the 'language' variable to prevent crash --- webcit/gettext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2