Commit a6773501 authored by Michal Sudolsky's avatar Michal Sudolsky Committed by Uli Schlachter
Browse files

fix double free and failed assertions in cairo_scaled_font_destroy

parent f8967015
Pipeline #216363 passed with stages
in 27 minutes and 34 seconds
......@@ -1320,15 +1320,15 @@ cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font)
assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&scaled_font->ref_count));
font_map = _cairo_scaled_font_map_lock ();
assert (font_map != NULL);
if (! _cairo_reference_count_dec_and_test (&scaled_font->ref_count))
return;
goto unlock;
assert (! scaled_font->cache_frozen);
assert (! scaled_font->global_cache_frozen);
font_map = _cairo_scaled_font_map_lock ();
assert (font_map != NULL);
/* Another thread may have resurrected the font whilst we waited */
if (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&scaled_font->ref_count)) {
if (! scaled_font->placeholder &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment