aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorTobia Tesan2016-02-29 20:32:10 +0100
committerTobia Tesan2016-03-01 20:40:46 +0100
commitcd5229bc733028fc477110ba140068602f77e441 (patch)
treeac6040b09e3e51fca68b310d050dd71f6705993f /engines/wintermute
parentbf9865ebbba264eb05c3788b273406eb55182086 (diff)
downloadscummvm-rg350-cd5229bc733028fc477110ba140068602f77e441.tar.gz
scummvm-rg350-cd5229bc733028fc477110ba140068602f77e441.tar.bz2
scummvm-rg350-cd5229bc733028fc477110ba140068602f77e441.zip
WINTERMUTE: Remember to delete watch instances
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp b/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp
index cfecc28d4f..5a2291894f 100644
--- a/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp
+++ b/engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp
@@ -130,6 +130,7 @@ void DebuggableScript::updateWatches() {
Watch *findMe = _watchInstances[i]->_watch;
if (Common::find(_engine->_watches.begin(), _engine->_watches.end(), findMe) == _engine->_watches.end()) {
// Not found on engine-wide list, must have been removed from watches. Must remove it from local list.
+ delete _watchInstances[i];
_watchInstances.remove_at(i);
}
}