diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc index 0831ecb9d..918f649da 100644 --- a/src/hb-coretext.cc +++ b/src/hb-coretext.cc @@ -357,7 +357,7 @@ retry: /* Drop and recreate. */ /* If someone dropped it in the mean time, throw it away and don't touch it. * Otherwise, destruct it. */ - if (likely (font->data.coretext.cmpexch (data, nullptr))) + if (likely (font->data.coretext.cmpexch (const_cast (data), nullptr))) _hb_coretext_shaper_font_data_destroy (const_cast (data)); else goto retry;