GUI: Fix bug in ThemeEngine::addFont related to localized fonts

Basically, it was remembering the font under its non-localized name.
This resulted in a leak, and potentially could have caused the wrong
font to be used in a localization.

svn-id: r54256
This commit is contained in:
Max Horn 2010-11-15 23:52:06 +00:00
parent 8799db594e
commit 3450f47667

View File

@ -575,7 +575,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) {
_texts[textId]->_fontPtr = loadFont(localized); _texts[textId]->_fontPtr = loadFont(localized);
if (_texts[textId]->_fontPtr) if (_texts[textId]->_fontPtr)
FontMan.assignFontToName(file, _texts[textId]->_fontPtr); FontMan.assignFontToName(localized, _texts[textId]->_fontPtr);
// Fallback to non-localized font and default translation // Fallback to non-localized font and default translation
else { else {