macOS: Fix small leak in glyph rendering code

This commit is contained in:
Kovid Goyal 2018-09-10 21:41:26 +05:30
parent 0195e7f841
commit 8176f661ea
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -376,6 +376,8 @@ render_glyphs(CTFontRef font, unsigned int width, unsigned int height, unsigned
CGContextSetTextMatrix(render_ctx, CGAffineTransformIdentity); CGContextSetTextMatrix(render_ctx, CGAffineTransformIdentity);
CGContextSetTextPosition(render_ctx, 0, height - baseline); CGContextSetTextPosition(render_ctx, 0, height - baseline);
CTFontDrawGlyphs(font, glyphs, positions, num_glyphs, render_ctx); CTFontDrawGlyphs(font, glyphs, positions, num_glyphs, render_ctx);
CGContextRelease(render_ctx);
GColorSpaceRelease(gray_color_space);
} }
static inline bool static inline bool