util/raster-all: render paint output only on success

This commit is contained in:
Behdad Esfahbod committed 2026-02-24 05:34:40 -03:00
1 parent df8892d2b1
commit daba58ea97
1 file changed
+2 -6
+2 -6
View File
@@ -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)