[ot-svg] Free pixmap buffer if error occurs while rendering.

This commit is contained in:
Moazin Khatti 2019-08-22 22:51:02 +05:00
parent 836c94e8d2
commit b6f04b03e4
1 changed files with 7 additions and 1 deletions

View File

@ -113,7 +113,13 @@
if ( error )
return error;
return hooks.render_svg( slot );
error = hooks.render_svg( slot );
if ( error )
FT_FREE( slot->bitmap.buffer );
else
slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
return error;
}
static const SVG_Interface svg_interface = {