projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b74e13a
)
* Added a null pointer check to the 'language' variable to prevent crash
author
Art Cancro
<ajc@citadel.org>
Wed, 25 Feb 2009 17:06:23 +0000
(17:06 +0000)
committer
Art Cancro
<ajc@citadel.org>
Wed, 25 Feb 2009 17:06:23 +0000
(17:06 +0000)
webcit/gettext.c
patch
|
blob
|
history
diff --git
a/webcit/gettext.c
b/webcit/gettext.c
index d14ecada155270ff28c9c33490d1a6820ddd4759..917ee4bd30508f8159482cde961798279c4bdda3 100644
(file)
--- a/
webcit/gettext.c
+++ b/
webcit/gettext.c
@@
-238,7
+238,7
@@
void preset_locale(void)
char *language;
language = getenv("WEBCIT_LANG");
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);
}
lprintf(9, "Nailing locale to %s\n", language);
setlocale(LC_MESSAGES, language);
}