diff options
author | Paul Gilbert | 2014-03-08 08:26:09 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-03-08 08:26:09 -0500 |
commit | 7310080967d506de91b99611e468c209456b3f81 (patch) | |
tree | 4413f519a69485db46e4ad03d5da6028090abe8b | |
parent | 8bfa5f1da2d84fafdda88aac0cdd5e17ebfbc100 (diff) | |
download | scummvm-rg350-7310080967d506de91b99611e468c209456b3f81.tar.gz scummvm-rg350-7310080967d506de91b99611e468c209456b3f81.tar.bz2 scummvm-rg350-7310080967d506de91b99611e468c209456b3f81.zip |
MADS: Fix memory leak with conversation font loading
-rw-r--r-- | engines/mads/messages.cpp | 5 | ||||
-rw-r--r-- | engines/mads/messages.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/engines/mads/messages.cpp b/engines/mads/messages.cpp index aaf6c4100e..69d984313b 100644 --- a/engines/mads/messages.cpp +++ b/engines/mads/messages.cpp @@ -39,6 +39,10 @@ KernelMessages::KernelMessages(MADSEngine *vm): _vm(vm) { word_8469E = 0; } +KernelMessages::~KernelMessages() { + delete _talkFont; +} + void KernelMessages::clear() { Scene &scene = _vm->_game->_scene; @@ -46,7 +50,6 @@ void KernelMessages::clear() { _entries[i]._flags = 0; scene._textSpacing = -1; - _talkFont = _vm->_font->getFont(FONT_CONVERSATION); } int KernelMessages::add(const Common::Point &pt, uint fontColor, uint8 flags, diff --git a/engines/mads/messages.h b/engines/mads/messages.h index 19a0115f94..340f33ef46 100644 --- a/engines/mads/messages.h +++ b/engines/mads/messages.h @@ -75,6 +75,7 @@ public: int word_8469E; public: KernelMessages(MADSEngine *vm); + ~KernelMessages(); void clear(); int add(const Common::Point &pt, uint fontColor, uint8 flags, uint8 abortTimers, |