ACCESS: Fix crashes for scene debugger command when launched from cmdCheckTimer
This commit is contained in:
parent
340a3fa91b
commit
4d82191f34
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue