Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Xiangquan <xiaoxiangquan@gmail.com>2011-09-16 12:32:46 +0400
committerXiao Xiangquan <xiaoxiangquan@gmail.com>2011-09-16 12:32:46 +0400
commite07b807357a4667db5de02df1e8f6b27775ca389 (patch)
treed018d68da2c9b65f3064a8372111f956e739386e /source/blender/blenfont
parent4212d2ecb5d28286063bdf0074eb8f4539722e83 (diff)
fix NULL check for getenv("LANGUAGE")
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_lang.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 3547e5095e2..581a936ee87 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -150,9 +150,10 @@ void BLF_lang_set(const char *str)
{
const char *locale;
static char default_locale[64]="\0";
+ static char *env_language = getenv("LANGUAGE");
- if(default_locale[0]==0) /* store defaul locale */
- strncpy(default_locale, getenv("LANGUAGE"), sizeof(default_locale));
+ if(default_locale[0]==0 && env_language!=NULL) /* store defaul locale */
+ strncpy(default_locale, env_language, sizeof(default_locale));
if(short_locale[0])
locale= short_locale;