aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-01-23 01:40:13 +0100
committerEinar Johan Trøan Sømåen2013-01-23 01:40:13 +0100
commit6476ba33d23135ace4550d6dc79f40e5f607386f (patch)
tree5553fd96757be66f7d01f2c47e39198590375ce8 /engines/wintermute/base
parent53f0871b075546fc540b02dfcf8ee65fafbe6134 (diff)
downloadscummvm-rg350-6476ba33d23135ace4550d6dc79f40e5f607386f.tar.gz
scummvm-rg350-6476ba33d23135ace4550d6dc79f40e5f607386f.tar.bz2
scummvm-rg350-6476ba33d23135ace4550d6dc79f40e5f607386f.zip
WINTERMUTE: Fix double delete of TTFs.
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r--engines/wintermute/base/font/base_font_truetype.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp
index ce18594928..83f0a35f53 100644
--- a/engines/wintermute/base/font/base_font_truetype.cpp
+++ b/engines/wintermute/base/font/base_font_truetype.cpp
@@ -560,7 +560,7 @@ bool BaseFontTT::initFont() {
if (file) {
_deletableFont = Graphics::loadTTFFont(*file, 96, _fontHeight); // Use the same dpi as WME (96 vs 72).
_font = _deletableFont;
- delete file;
+ BaseFileManager::getEngineInstance()->closeFile(file);
file = NULL;
}
@@ -575,6 +575,7 @@ bool BaseFontTT::initFont() {
_deletableFont = Graphics::loadTTFFont(*file, 96, _fontHeight); // Use the same dpi as WME (96 vs 72).
_font = _deletableFont;
}
+ // We're not using BaseFileManager, so clean up after ourselves:
delete file;
file = NULL;
delete themeArchive;