aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/thread.cpp
diff options
context:
space:
mode:
authorjohndoe1232014-08-01 22:53:07 +0200
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit297996a0900acca177ecfd3ffa51907ad8d284fa (patch)
tree0f91f6c87cac520b5d7e334fd11e8e88a564e89e /engines/illusions/thread.cpp
parentad2c0aaf3d81688f9c575eef64b571cb73249997 (diff)
downloadscummvm-rg350-297996a0900acca177ecfd3ffa51907ad8d284fa.tar.gz
scummvm-rg350-297996a0900acca177ecfd3ffa51907ad8d284fa.tar.bz2
scummvm-rg350-297996a0900acca177ecfd3ffa51907ad8d284fa.zip
ILLUSIONS: Add sound effects (still buggy)
Diffstat (limited to 'engines/illusions/thread.cpp')
-rw-r--r--engines/illusions/thread.cpp3
1 files changed, 2 insertions, 1 deletions
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)