From 297996a0900acca177ecfd3ffa51907ad8d284fa Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Fri, 1 Aug 2014 22:53:07 +0200 Subject: ILLUSIONS: Add sound effects (still buggy) --- engines/illusions/thread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/illusions/thread.cpp') diff --git a/engines/illusions/thread.cpp b/engines/illusions/thread.cpp index 6c6a7d6fa2..941706abfd 100644 --- a/engines/illusions/thread.cpp +++ b/engines/illusions/thread.cpp @@ -131,13 +131,14 @@ void ThreadList::startThread(Thread *thread) { } void ThreadList::updateThreads() { + // TODO Move outer loop to caller while (1) { Iterator it = _threads.begin(); while (it != _threads.end()) { Thread *thread = *it; if (thread->_terminated) { - it = _threads.erase(it); delete thread; + it = _threads.erase(it); } else { int status = kTSRun; while (!thread->_terminated && status != kTSTerminate && status != kTSYield) -- cgit v1.2.3