aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/zvision/script_manager.cpp3
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();