diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-14 12:52:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-14 12:54:09 +0300 |
commit | 6a8a67903729d0e8bb44e15547f827b2b5638ba5 (patch) | |
tree | 0ae54aa8a74582f94f6aa1e6abd0bb3744b81a78 /source/blender | |
parent | 7cfabcef5c8f29246bfbedac663b6ed0baa8a64f (diff) |
BLF: avoid glyph cache use-after free
Causes crash if the font size isn't set after clearing (see T51200)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenfont/intern/blf_glyph.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index aa7d539538b..bbbabfb8ba2 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -135,6 +135,7 @@ void blf_glyph_cache_clear(FontBLF *font) while ((gc = BLI_pophead(&font->cache))) { blf_glyph_cache_free(gc); } + font->glyph_cache = NULL; } void blf_glyph_cache_free(GlyphCacheBLF *gc) |