diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index b3f9535c3..65f499a00 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -2792,6 +2792,10 @@ struct VariationStore hb_set_t region_indices; for (unsigned int i = 0; i < inner_maps.length; i++) (src+src->dataSets[i]).collect_region_refs (region_indices, inner_maps[i]); + + if (region_indices.in_error ()) + return_trace (false); + region_indices.del_range ((src_regions).regionCount, hb_set_t::INVALID); /* TODO use constructor when our data-structures support that. */