From 7504c67fb7f1b7ae2037cfc6b4a1db30b0a84f3d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 26 Feb 2025 15:24:40 -0700 Subject: [PATCH] [CBDT] Return immediately if no data --- src/OT/Color/CBDT/CBDT.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/OT/Color/CBDT/CBDT.hh b/src/OT/Color/CBDT/CBDT.hh index bcf1848f4..e73f36aa2 100644 --- a/src/OT/Color/CBDT/CBDT.hh +++ b/src/OT/Color/CBDT/CBDT.hh @@ -945,6 +945,8 @@ struct CBDT bool paint_glyph (hb_font_t *font, hb_codepoint_t glyph, hb_paint_funcs_t *funcs, void *data) const { + if (!has_data ()) return false; + hb_glyph_extents_t extents; hb_glyph_extents_t pixel_extents; hb_blob_t *blob = reference_png (font, glyph);