From d06f69f94b6cb2fcf51c3d0018a960d5d0c50051 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 23 Nov 2012 06:01:30 +0100 Subject: SCUMM: Fix memory leak when loading old MI1 Mac savegames I completely forgot to delete the dummy iMUSE object after using it to skip over the old music save information. Thanks to Lordhoto for pointing this out. --- engines/scumm/player_mac.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/scumm') diff --git a/engines/scumm/player_mac.cpp b/engines/scumm/player_mac.cpp index 6cfbec398e..fa0dd9d052 100644 --- a/engines/scumm/player_mac.cpp +++ b/engines/scumm/player_mac.cpp @@ -104,6 +104,7 @@ void Player_Mac::saveLoadWithSerializer(Serializer *ser) { if (_vm->_game.id == GID_MONKEY && ser->isLoading()) { IMuse *dummyImuse = IMuse::create(_vm->_system, NULL, NULL); dummyImuse->save_or_load(ser, _vm, false); + delete dummyImuse; } } else { static const SaveLoadEntry musicEntries[] = { -- cgit v1.2.3