Merge branch 'fix-issue-587' into 'master'

Check for cache not frozen in glyph_page_can_remove()

Closes #587

See merge request cairo/cairo!355
This commit is contained in:
Uli Schlachter 2022-09-05 20:21:38 +00:00
commit a7d31a8714

View file

@ -2703,7 +2703,16 @@ _cairo_scaled_glyph_page_can_remove (const void *closure)
cairo_scaled_font_t *scaled_font;
scaled_font = page->scaled_font;
return CAIRO_MUTEX_TRY_LOCK (scaled_font->mutex);
if (!CAIRO_MUTEX_TRY_LOCK (scaled_font->mutex))
return FALSE;
if (scaled_font->cache_frozen != 0) {
CAIRO_MUTEX_UNLOCK (scaled_font->mutex);
return FALSE;
}
return TRUE;
}
static cairo_status_t