BLF: avoid glyph cache use-after free
[blender.git] / source / blender / blenfont / intern / blf_glyph.c
index aa7d539538b0249c71c1656c0280414e8efa2628..bbbabfb8ba25f992fabd1c88b3db8ab2a812b470 100644 (file)
@@ -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)