Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2017-04-14 12:52:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-14 12:54:09 +0300
commit6a8a67903729d0e8bb44e15547f827b2b5638ba5 (patch)
tree0ae54aa8a74582f94f6aa1e6abd0bb3744b81a78 /source/blender/blenfont
parent7cfabcef5c8f29246bfbedac663b6ed0baa8a64f (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/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c1
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)