script: Manually unlink font entries upon destruction

As the device is already finished, we can not lock it without raising an
error, so we have to open code the destruction of the font entries.
Fortunately we can make several simplifying assumptions about the
required cleanup as we know the device is also being destroyed.
This commit is contained in:
Chris Wilson 2010-03-23 20:04:10 +00:00
parent cccf6753ab
commit 83d1bd9f37

View file

@ -1772,7 +1772,9 @@ _device_destroy (void *abstract_device)
cairo_script_surface_font_private_t,
link);
cairo_list_del (&font->link);
_cairo_script_surface_scaled_font_fini (font->parent);
if (font->parent->surface_private == font)
font->parent->surface_private = NULL;
free (font);
}
while (! cairo_list_is_empty (&ctx->defines)) {