Fix for BLF using realloc() on guarded-alloced memory
This commit is contained in:
parent
15ab4638cb
commit
6b283f1168
Notes:
blender-bot
2023-02-14 11:20:23 +01:00
Referenced by issue #38244, memory leak when scaling any panel
|
@ -162,7 +162,7 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc)
|
|||
|
||||
if (gc->cur_tex >= gc->ntex) {
|
||||
gc->ntex *= 2;
|
||||
gc->textures = (GLuint *)realloc((void *)gc->textures, sizeof(GLuint) * gc->ntex);
|
||||
gc->textures = (GLuint *)MEM_reallocN((void *)gc->textures, sizeof(GLuint) * gc->ntex);
|
||||
}
|
||||
|
||||
gc->p2_width = (int)blf_next_p2((unsigned int)((gc->rem_glyphs * gc->max_glyph_width) + (gc->pad * 2)));
|
||||
|
|
Loading…
Reference in New Issue