[cairo-font-face] Tolerate null font_face->backend->destroy()

This commit is contained in:
Behdad Esfahbod 2008-05-09 13:03:51 +02:00
parent 96599225e2
commit 1f05cae0a9

View file

@ -132,7 +132,8 @@ cairo_font_face_destroy (cairo_font_face_t *font_face)
if (! _cairo_reference_count_dec_and_test (&font_face->ref_count))
return;
font_face->backend->destroy (font_face);
if (font_face->backend->destroy)
font_face->backend->destroy (font_face);
/* We allow resurrection to deal with some memory management for the
* FreeType backend where cairo_ft_font_face_t and cairo_ft_unscaled_font_t