aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2010-11-15 23:52:06 +0000
committerMax Horn2010-11-15 23:52:06 +0000
commit3450f476670eab0afa9e8eaf738128f136b95d63 (patch)
tree349ac79785c785ce97a8370eb14345b4d4629e99
parent8799db594eff34dcc2441de735d85c63dd4c45bc (diff)
downloadscummvm-rg350-3450f476670eab0afa9e8eaf738128f136b95d63.tar.gz
scummvm-rg350-3450f476670eab0afa9e8eaf738128f136b95d63.tar.bz2
scummvm-rg350-3450f476670eab0afa9e8eaf738128f136b95d63.zip
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
-rw-r--r--gui/ThemeEngine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp
index 83cfa91190..6c2a87a7df 100644
--- a/gui/ThemeEngine.cpp
+++ b/gui/ThemeEngine.cpp
@@ -575,7 +575,7 @@ bool ThemeEngine::addFont(TextData textId, const Common::String &file) {
_texts[textId]->_fontPtr = loadFont(localized);
if (_texts[textId]->_fontPtr)
- FontMan.assignFontToName(file, _texts[textId]->_fontPtr);
+ FontMan.assignFontToName(localized, _texts[textId]->_fontPtr);
// Fallback to non-localized font and default translation
else {