[glyf] Fix font error check

This commit is contained in:
Behdad Esfahbod 2022-11-22 15:01:48 -07:00
parent 04c525019c
commit ba0d28ea36
1 changed files with 1 additions and 1 deletions

View File

@ -413,7 +413,7 @@ glyf::_compile_subset_glyphs_with_deltas (const hb_subset_plan_t *plan,
{ {
OT::glyf_accelerator_t glyf (plan->source); OT::glyf_accelerator_t glyf (plan->source);
hb_font_t *font = hb_font_create (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<hb_variation_t> vars; hb_vector_t<hb_variation_t> vars;
if (unlikely (!vars.alloc (plan->user_axes_location->get_population ()))) if (unlikely (!vars.alloc (plan->user_axes_location->get_population ())))