aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/script_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/script_manager.cpp')
-rw-r--r--engines/zvision/script_manager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp
index d671c6178c..bcede2060d 100644
--- a/engines/zvision/script_manager.cpp
+++ b/engines/zvision/script_manager.cpp
@@ -253,7 +253,9 @@ void ScriptManager::changeLocationIntern() {
delete (*iter);
}
_activePuzzles.clear();
- // We can clear without deleting from the heap because we use SharedPtr
+ for (Common::HashMap<uint32, Control *>::iterator iter = _activeControls.begin(); iter != _activeControls.end(); iter++) {
+ delete (*iter)._value;
+ }
_activeControls.clear();
_engine->clearAllMouseEvents();