Unload font if loading a new one (fixes harmless "leak" of credits fonts)

This commit is contained in:
Glenn Maynard
2002-10-13 22:58:31 +00:00
parent 0b291313da
commit 39bed921aa
+5
View File
@@ -77,6 +77,11 @@ bool BitmapText::LoadFromFont( CString sFontFilePath )
{
LOG->Trace( "BitmapText::LoadFromFontName(%s)", sFontFilePath );
if( m_pFont ) {
FONT->UnloadFont( m_pFont->m_sTexturePath );
m_pFont = NULL;
}
// load font
m_pFont = FONT->LoadFont( sFontFilePath );