From 1f05cae0a9aaff23a4d80b309d30ed5047198113 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 9 May 2008 13:03:51 +0200 Subject: [PATCH] [cairo-font-face] Tolerate null font_face->backend->destroy() --- src/cairo-font-face.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cairo-font-face.c b/src/cairo-font-face.c index 49c8cdf73..6fe6dfcb7 100644 --- a/src/cairo-font-face.c +++ b/src/cairo-font-face.c @@ -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