diff options
author | Filippos Karapetis | 2008-08-01 14:27:40 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-08-01 14:27:40 +0000 |
commit | 3f56ff874213797b19634113bb372946e6915608 (patch) | |
tree | 5dc82810271e89727a2b0547961a1983b0bba249 /engines | |
parent | 0145dd38d933f0e5693483b012e0904a18b8fb91 (diff) | |
download | scummvm-rg350-3f56ff874213797b19634113bb372946e6915608.tar.gz scummvm-rg350-3f56ff874213797b19634113bb372946e6915608.tar.bz2 scummvm-rg350-3f56ff874213797b19634113bb372946e6915608.zip |
Fixed crash on exit from commit #32742 - the memory leak was only in IHNM, not ITE (in ITE, the 4 sprite lists are actually one)
svn-id: r33492
Diffstat (limited to 'engines')
-rw-r--r-- | engines/saga/sprite.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index be4f2a423d..d9c7b446ba 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -74,9 +74,11 @@ Sprite::Sprite(SagaEngine *vm) : _vm(vm) { Sprite::~Sprite(void) { debug(8, "Shutting down sprite subsystem..."); _mainSprites.freeMem(); - _inventorySprites.freeMem(); - _arrowSprites.freeMem(); - _saveReminderSprites.freeMem(); + if (_vm->getGameType() == GType_IHNM) { + _inventorySprites.freeMem(); + _arrowSprites.freeMem(); + _saveReminderSprites.freeMem(); + } free(_decodeBuf); } |