From daba58ea97d402da525ab08eaee3ce1c6a35a943 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 24 Feb 2026 05:34:10 -0300 Subject: [PATCH] util/raster-all: render paint output only on success --- util/hb-raster-all.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/util/hb-raster-all.cc b/util/hb-raster-all.cc index fe5114b64..8a4bda02a 100644 --- a/util/hb-raster-all.cc +++ b/util/hb-raster-all.cc @@ -162,12 +162,8 @@ main (int argc, char **argv) hb_bool_t painted = hb_font_paint_glyph_or_fail (font, gid, hb_raster_paint_get_funcs (), pnt, 0, HB_COLOR (0, 0, 0, 255)); - img = hb_raster_paint_render (pnt); - if (!painted && img) - { - hb_raster_paint_recycle_image (pnt, img); - img = nullptr; - } + if (painted) + img = hb_raster_paint_render (pnt); } if (img)