[VARC] Fix scratch caching

This commit is contained in:
Behdad Esfahbod 2025-03-03 01:27:32 -07:00
parent a62058eee8
commit 17ddc84406

View file

@ -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);