From 2fd0beab2a7a2945ccf9641594414893266e649d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Jun 2009 20:28:49 +0100 Subject: [ft] Don't call FT_Done_Face() on a face we do not own _font_map_release_face_lock_held() was being called unconditionally during _cairo_ft_font_reset_static_data(). This presents two problems. The first is that we call FT_Done_Face() on an object not owned by cairo, and the second is that the bookkeeping is then incorrect which will trigger an assert later. --- src/cairo-ft-font.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 19bfe46a2..0b1e624bc 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -233,7 +233,8 @@ _cairo_ft_unscaled_font_map_destroy (void) _cairo_hash_table_remove (font_map->hash_table, &unscaled->base.hash_entry); - _font_map_release_face_lock_held (font_map, unscaled); + if (! unscaled->from_face) + _font_map_release_face_lock_held (font_map, unscaled); _cairo_ft_unscaled_font_fini (unscaled); free (unscaled); } -- cgit v1.2.3