diff options
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc index b16f5077cc9..24beada3e8c 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/hb-subset-plan.cc @@ -146,7 +146,7 @@ static inline void gpos->collect_variation_indices (&c); gdef->remap_layout_variation_indices (layout_variation_indices, layout_variation_idx_map); - + gdef.destroy (); gpos.destroy (); } @@ -181,7 +181,7 @@ _populate_gids_to_retain (hb_subset_plan_t* plan, const hb_set_t *input_glyphs_to_retain, bool close_over_gsub, bool close_over_gpos, - bool close_over_gdef) + bool close_over_gdef) { OT::cmap::accelerator_t cmap; OT::glyf::accelerator_t glyf; @@ -314,8 +314,11 @@ hb_subset_plan_t * hb_subset_plan_create (hb_face_t *face, hb_subset_input_t *input) { - hb_subset_plan_t *plan = hb_object_create<hb_subset_plan_t> (); + hb_subset_plan_t *plan; + if (unlikely (!(plan = hb_object_create<hb_subset_plan_t> ()))) + return const_cast<hb_subset_plan_t *> (&Null (hb_subset_plan_t)); + plan->successful = true; plan->drop_hints = input->drop_hints; plan->desubroutinize = input->desubroutinize; plan->retain_gids = input->retain_gids; @@ -346,7 +349,7 @@ hb_subset_plan_create (hb_face_t *face, input->glyphs, !input->drop_tables->has (HB_OT_TAG_GSUB), !input->drop_tables->has (HB_OT_TAG_GPOS), - !input->drop_tables->has (HB_OT_TAG_GDEF)); + !input->drop_tables->has (HB_OT_TAG_GDEF)); _create_old_gid_to_new_gid_map (face, input->retain_gids, |