From cd5229bc733028fc477110ba140068602f77e441 Mon Sep 17 00:00:00 2001 From: Tobia Tesan Date: Mon, 29 Feb 2016 20:32:10 +0100 Subject: WINTERMUTE: Remember to delete watch instances --- engines/wintermute/base/scriptables/debuggable/debuggable_script.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines/wintermute/base/scriptables/debuggable') 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); } } -- cgit v1.2.3