From ba0d28ea3647fe5d8108ba4f2ca60be7f267c043 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 22 Nov 2022 15:01:48 -0700 Subject: [PATCH] [glyf] Fix font error check --- src/OT/glyf/glyf.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OT/glyf/glyf.hh b/src/OT/glyf/glyf.hh index 8154e81c3..f04e5449e 100644 --- a/src/OT/glyf/glyf.hh +++ b/src/OT/glyf/glyf.hh @@ -413,7 +413,7 @@ glyf::_compile_subset_glyphs_with_deltas (const hb_subset_plan_t *plan, { OT::glyf_accelerator_t glyf (plan->source); hb_font_t *font = hb_font_create (plan->source); - if (unlikely (!font)) return false; + if (unlikely (font == hb_font_get_empty ())) return false; hb_vector_t vars; if (unlikely (!vars.alloc (plan->user_axes_location->get_population ())))