aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/illusions/thread.cpp')
-rw-r--r--engines/illusions/thread.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/illusions/thread.cpp b/engines/illusions/thread.cpp
index 980a8afc4b..cac13d9760 100644
--- a/engines/illusions/thread.cpp
+++ b/engines/illusions/thread.cpp
@@ -286,9 +286,12 @@ uint32 ThreadList::getThreadSceneId(uint32 threadId) {
bool ThreadList::isActiveThread(int msgNum) {
// Check if at least one thread returns a non-null value for the message
- for (Iterator it = _threads.begin(); it != _threads.end(); ++it)
- if ((*it)->sendMessage(msgNum, 0) != 0)
+ for (Iterator it = _threads.begin(); it != _threads.end(); ++it) {
+ Thread *thread = *it;
+ if (!thread->_terminated && thread->_pauseCtr <= 0 &&
+ thread->sendMessage(msgNum, 0) != 0)
return true;
+ }
return false;
}