aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/sched.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tony/sched.cpp')
-rw-r--r--engines/tony/sched.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/tony/sched.cpp b/engines/tony/sched.cpp
index f8a7fd2538..41531bf225 100644
--- a/engines/tony/sched.cpp
+++ b/engines/tony/sched.cpp
@@ -299,6 +299,9 @@ void Scheduler::giveWay(PPROCESS pReSchedProc) {
* @param expired Set to true if delay period expired
*/
void Scheduler::waitForSingleObject(CORO_PARAM, int pid, int duration, bool *expired) {
+ if (!pCurrent)
+ error("Called Scheduler::waitForSingleObject from the main process");
+
CORO_BEGIN_CONTEXT;
uint32 endTime;
PROCESS *pProc;