diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index b1b47ded3..87c0ae2f5 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -3455,16 +3455,14 @@ struct VariationDevice { TRACE_SERIALIZE (this); if (!layout_variation_idx_delta_map) return_trace (nullptr); - auto snap = c->snapshot (); - auto *out = c->embed (this); - if (unlikely (!out)) return_trace (nullptr); hb_pair_t *v; if (!layout_variation_idx_delta_map->has (varIdx, &v)) - { - c->revert (snap); return_trace (nullptr); - } + + auto *out = c->embed (this); + if (unlikely (!out)) return_trace (nullptr); + unsigned new_idx = hb_first (*v); out->varIdx = new_idx; return_trace (out);