diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-03 20:28:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-06 16:17:03 +0100 |
commit | 2fd0beab2a7a2945ccf9641594414893266e649d (patch) | |
tree | 6e58ed227b38851974e134d9921c1a1f897f8de9 /src | |
parent | 0e38fe1c677b0abaac8993fac9cf6a30d6cd1b38 (diff) |
[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.
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-ft-font.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 19bfe46a..0b1e624b 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); } |