diff --git a/src/hb-subset-cff1.cc b/src/hb-subset-cff1.cc index 8b9f2308b..79a64770b 100644 --- a/src/hb-subset-cff1.cc +++ b/src/hb-subset-cff1.cc @@ -492,16 +492,6 @@ struct cff1_subset_plan return; } - hb_vector_t *glyph_to_sid_map = acc.cff_accelerator ? - acc.cff_accelerator->glyph_to_sid_map.get_acquire () : - nullptr; - bool created_map = false; - if (!glyph_to_sid_map && acc.cff_accelerator) - { - created_map = true; - glyph_to_sid_map = acc.create_glyph_to_sid_map (); - } - code_pair_t glyph_to_sid_cache {0, HB_CODEPOINT_INVALID}; unsigned int glyph; @@ -514,6 +504,16 @@ struct cff1_subset_plan return; } + hb_vector_t *glyph_to_sid_map = acc.cff_accelerator ? + acc.cff_accelerator->glyph_to_sid_map.get_acquire () : + nullptr; + bool created_map = false; + if (!glyph_to_sid_map && acc.cff_accelerator) + { + created_map = true; + glyph_to_sid_map = acc.create_glyph_to_sid_map (); + } + auto it = hb_iter (plan->new_to_old_gid_list); if (it->first == 0) it++; auto _ = *it;