diff --git a/src/OT/Var/VARC/VARC.hh b/src/OT/Var/VARC/VARC.hh index 6380b8bf4..b6f8aea81 100644 --- a/src/OT/Var/VARC/VARC.hh +++ b/src/OT/Var/VARC/VARC.hh @@ -226,7 +226,7 @@ struct VARC } void release_scratch (hb_varc_scratch_t *scratch) const { - if (!cached_scratch.cmpexch (scratch, nullptr)) + if (!cached_scratch.cmpexch (nullptr, scratch)) { scratch->~hb_varc_scratch_t (); hb_free (scratch);