From 3450f476670eab0afa9e8eaf738128f136b95d63 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 15 Nov 2010 23:52:06 +0000 Subject: [PATCH] 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 --- gui/ThemeEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 83cfa911907..6c2a87a7df5 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 {