diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-10 18:29:35 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-10 18:29:57 +0300 |
commit | 1bd8a82960823268b1cadc2273c2cc1647422041 (patch) | |
tree | af58db3e8f268422103086fb3f4384ca6251b49a /source/blender/blenfont/intern/blf_font.c | |
parent | 8f5e7c3fa9914144d5b1d24b8e336f2b2ee0344b (diff) |
Fix assert failure when trying to draw empty string
Diffstat (limited to 'source/blender/blenfont/intern/blf_font.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 03f62cbb6ea..5846f7a29e4 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -202,6 +202,11 @@ static void blf_font_draw_ex( size_t i = 0; GlyphBLF **glyph_ascii_table = font->glyph_cache->glyph_ascii_table; + if (len == 0) { + /* early output, don't do any IMM OpenGL. */ + return; + } + BLF_KERNING_VARS(font, has_kerning, kern_mode); blf_font_ensure_ascii_table(font); |