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:
authorKent Mein <mein@cs.umn.edu>2007-09-17 19:39:03 +0400
committerKent Mein <mein@cs.umn.edu>2007-09-17 19:39:03 +0400
commitd1e5c86b76501cef3ad5d5ae70825fc6398d642f (patch)
treedecf199b2f0c37f180bfd54ecda9cc724c183913 /source/blender/src/language.c
parented47851517b9048829aec4c5a3025cdb482715dd (diff)
Added a NULL check that was needed.
Kent
Diffstat (limited to 'source/blender/src/language.c')
-rw-r--r--source/blender/src/language.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/src/language.c b/source/blender/src/language.c
index 7864468287e..c289d75f88b 100644
--- a/source/blender/src/language.c
+++ b/source/blender/src/language.c
@@ -128,10 +128,12 @@ int BIF_DrawString(BMF_Font* font, char *str, int translate)
struct LANGMenuEntry *lme;
lme = find_language(U.language);
- if (!strcmp(lme->code, "ja_JP"))
- string_to_utf8(str, utf_8, "Shift_JIS"); /* Japanese */
- else if (!strcmp(lme->code, "zh_CN"))
- string_to_utf8(str, utf_8, "GB2312"); /* Chinese */
+ if (lme !=NULL) {
+ if (!strcmp(lme->code, "ja_JP"))
+ string_to_utf8(str, utf_8, "Shift_JIS"); /* Japanese */
+ else if (!strcmp(lme->code, "zh_CN"))
+ string_to_utf8(str, utf_8, "GB2312"); /* Chinese */
+ }
return FTF_DrawString(utf_8, FTF_INPUT_UTF8);
}