diff options
author | richiesams | 2013-08-20 20:55:00 -0500 |
---|---|---|
committer | richiesams | 2013-08-20 20:55:00 -0500 |
commit | ac7b2251bb3cb41b10d2b69b3d3540895db057d8 (patch) | |
tree | 948317e264bebeae389506d17514cda6fe84876e | |
parent | 8e22af36b7e1500fa8ccca971225d87066cb9e26 (diff) | |
download | scummvm-rg350-ac7b2251bb3cb41b10d2b69b3d3540895db057d8.tar.gz scummvm-rg350-ac7b2251bb3cb41b10d2b69b3d3540895db057d8.tar.bz2 scummvm-rg350-ac7b2251bb3cb41b10d2b69b3d3540895db057d8.zip |
ZVISION: Delete Puzzles from heap before clearing _activePuzzles
-rw-r--r-- | engines/zvision/script_manager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp index 390fe0d742..c217cb8612 100644 --- a/engines/zvision/script_manager.cpp +++ b/engines/zvision/script_manager.cpp @@ -248,6 +248,9 @@ void ScriptManager::changeLocationIntern() { // Clear all the containers _referenceTable.clear(); _puzzlesToCheck.clear(); + for (Common::List<Puzzle *>::iterator iter = _activePuzzles.begin(); iter != _activePuzzles.end(); iter++) { + delete (*iter); + } _activePuzzles.clear(); // We can clear without deleting from the heap because we use SharedPtr _activeControls.clear(); |