aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/scripts.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp
index 9f321947f2..34d5372b56 100644
--- a/engines/access/scripts.cpp
+++ b/engines/access/scripts.cpp
@@ -46,6 +46,7 @@ Scripts::~Scripts() {
void Scripts::setScript(Resource *res) {
_resource = res;
_data = res->_stream;
+ _endFlag = true;
}
void Scripts::freeScriptData() {
@@ -416,6 +417,12 @@ void Scripts::cmdCheckTimer() {
_vm->_events->pollEvents();
_vm->_canSaveLoad = false;
+ // Since the ScummVM debugger can be launched from the above point, we need
+ // to check whether the script needs to be ended here, since some commands,
+ // like the scene command, can change the current script
+ if (_endFlag)
+ return;
+
if ((idx == 9) && (_vm->_events->_keypresses.size() > 0)) {
_vm->_events->zeroKeys();
_vm->_timers[9]._timer = 0;