# HG changeset patch # User pontscho # Date 999374264 0 # Node ID a4156c8cdd573a4ef2a984b70a1cb6812fdec9ac # Parent 60afe3421c04249baddad2ed99689534b81a433c add font free func. diff -r 60afe3421c04 -r a4156c8cdd57 Gui/mplayer/play.c --- a/Gui/mplayer/play.c Sat Sep 01 19:44:49 2001 +0000 +++ b/Gui/mplayer/play.c Sat Sep 01 19:57:44 2001 +0000 @@ -134,6 +134,8 @@ skinAppMPlayer=&tmpList; ret=skinRead( gtkShMem->sb.name ); + fntFreeFont(); + appInitStruct( &tmpList ); skinAppMPlayer=&appMPlayer; appInitStruct( &appMPlayer ); diff -r 60afe3421c04 -r a4156c8cdd57 Gui/skin/font.c --- a/Gui/skin/font.c Sat Sep 01 19:44:49 2001 +0000 +++ b/Gui/skin/font.c Sat Sep 01 19:57:44 2001 +0000 @@ -23,8 +23,18 @@ return id; } -void fntFreeFont( int id ) +void fntFreeFont( void ) { + int i; + for( i=0;i<25;i++ ) + { + if ( Fonts[i] ) + { + if ( Fonts[i]->Bitmap.Image ) free( Fonts[i]->Bitmap.Image ); + free( Fonts[i] ); + Fonts[i]=NULL; + } + } } int fntRead( char * path,char * fname,int id ) diff -r 60afe3421c04 -r a4156c8cdd57 Gui/skin/font.h --- a/Gui/skin/font.h Sat Sep 01 19:44:49 2001 +0000 +++ b/Gui/skin/font.h Sat Sep 01 19:57:44 2001 +0000 @@ -22,7 +22,7 @@ extern bmpFont * Fonts[25]; extern int fntAddNewFont( char * name ); -extern void fntFreeFont( int id ); +extern void fntFreeFont( void ); extern int fntFindID( char * name ); extern int fntRead( char * path,char * fname,int id );