diff options
author | Maximilian Schwerin <post@mschwerin.de> | 2008-11-03 16:06:15 +0100 |
---|---|---|
committer | Maximilian Schwerin <post@mschwerin.de> | 2008-11-03 16:06:15 +0100 |
commit | 1b86d0b5362a7b3f317b85696f9fc35d8bc0e7c4 (patch) | |
tree | 8f6ca8bb5b87e50d292156d0a07f199b1fb8ec20 | |
parent | a2e9c61995d019dab809b42e87c5e85f2f9abf08 (diff) | |
download | xine-lib-1b86d0b5362a7b3f317b85696f9fc35d8bc0e7c4.tar.gz xine-lib-1b86d0b5362a7b3f317b85696f9fc35d8bc0e7c4.tar.bz2 |
Free up resources when we finish with a Freetype font.
-rw-r--r-- | src/xine-engine/osd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xine-engine/osd.c b/src/xine-engine/osd.c index f8cbfefb2..af8286831 100644 --- a/src/xine-engine/osd.c +++ b/src/xine-engine/osd.c @@ -125,6 +125,8 @@ struct osd_ft2context_s { static void osd_free_ft2 (osd_object_t *osd) { if( osd->ft2 ) { + if ( osd->ft2->face ) + FT_Done_Face (osd->ft2->face); if ( osd->ft2->library ) FT_Done_FreeType(osd->ft2->library); free( osd->ft2 ); @@ -828,6 +830,11 @@ static int osd_set_font_freetype2( osd_object_t *osd, const char *fontname, int return 0; } } + + if (osd->ft2->face) { + FT_Done_Face (osd->ft2->face); + osd->ft2->face = NULL; + } #ifdef HAVE_FONTCONFIG do { |