diff options
Diffstat (limited to 'source/blender/ftfont')
-rw-r--r-- | source/blender/ftfont/intern/FTF_TTFont.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/ftfont/intern/FTF_TTFont.cpp b/source/blender/ftfont/intern/FTF_TTFont.cpp index 78245709e2d..a4d81fe0133 100644 --- a/source/blender/ftfont/intern/FTF_TTFont.cpp +++ b/source/blender/ftfont/intern/FTF_TTFont.cpp @@ -385,6 +385,8 @@ float FTF_TTFont::GetStringWidth(char* str, unsigned int flag) wchar_t wstr[FTF_MAX_STR_SIZE-1]={'\0'}; int len=0; + if (strlen(str)==0) return 0.0; + /* note; this utf8towchar() function I totally don't understand... without using translations it removes special characters completely. So, for now we just skip that then. (ton) */ |