BLF: avoid glyph cache use-after free

Causes crash if the font size isn't set after clearing (see T51200)
This commit is contained in:
Campbell Barton 2017-04-14 19:52:29 +10:00
parent 7cfabcef5c
commit 6a8a679037

@ -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)