diff options
Diffstat (limited to 'indra/llrender/llfontgl.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/llrender/llfontgl.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 647512eb2e..c4f36cabd0 100644..100755 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -541,7 +541,6 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch BOOL clip = FALSE; F32 cur_x = 0; - F32 drawn_x = 0; S32 start_of_last_word = 0; BOOL in_word = FALSE; @@ -599,6 +598,11 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch if(!fgi) { fgi = mFontFreetype->getGlyphInfo(wch); + + if (NULL == fgi) + { + return 0; + } } // account for glyphs that run beyond the starting point for the next glyphs @@ -624,7 +628,6 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch // Round after kerning. cur_x = (F32)llround(cur_x); - drawn_x = cur_x; } if( clip ) |