summaryrefslogtreecommitdiff
path: root/src/xine-engine/osd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/osd.c')
-rw-r--r--src/xine-engine/osd.c7
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 {