[MPlayer-cvslog] r32887 - trunk/gui/skin/font.c

ib subversion at mplayerhq.hu
Fri Feb 11 13:56:25 CET 2011


Author: ib
Date: Fri Feb 11 13:56:25 2011
New Revision: 32887

Log:
Make freed font reusable.

Modified:
   trunk/gui/skin/font.c

Modified: trunk/gui/skin/font.c
==============================================================================
--- trunk/gui/skin/font.c	Fri Feb 11 13:50:49 2011	(r32886)
+++ trunk/gui/skin/font.c	Fri Feb 11 13:56:25 2011	(r32887)
@@ -76,7 +76,11 @@ int fntRead( char * path,char * fname )
  av_strlcpy( tmp,path,sizeof( tmp ) );
  av_strlcat( tmp,fname,sizeof( tmp ) ); av_strlcat( tmp,".fnt",sizeof( tmp ) );
  if ( ( f=fopen( tmp,"rt" ) ) == NULL )
-   { free( Fonts[id] ); return -3; }
+  {
+   free( Fonts[id] );
+   Fonts[id] = NULL;
+   return -3;
+  }
 
  while ( fgets( tmp,255,f ) )
   {


More information about the MPlayer-cvslog mailing list