aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2015-05-15 11:13:13 +0200
committerTorbjörn Andersson2015-05-15 11:13:13 +0200
commit404839bda620e27e99d4e9052ff02cbeb40406df (patch)
treec5617bed50f97fac614965456c19edf976b98867 /engines
parent915e65d949c7beb612207e8229cb1caa6f06f116 (diff)
downloadscummvm-rg350-404839bda620e27e99d4e9052ff02cbeb40406df.tar.gz
scummvm-rg350-404839bda620e27e99d4e9052ff02cbeb40406df.tar.bz2
scummvm-rg350-404839bda620e27e99d4e9052ff02cbeb40406df.zip
TOON: Check for quitting in runEventScript()
This keeps the game from hanging when trying to quit during Jim's gym demonstration. Hopefully any other effect of it is also good.
Diffstat (limited to 'engines')
-rw-r--r--engines/toon/toon.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 09f865f798..9e2905f454 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -1785,7 +1785,7 @@ int32 ToonEngine::runEventScript(int32 x, int32 y, int32 mode, int32 id, int32 s
_currentScriptRegion++;
_script->start(status, 1);
- while (_script->run(status))
+ while (_script->run(status) && !_shouldQuit)
waitForScriptStep();
_currentScriptRegion--;