mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Fixed the crash at the beginning of EcoQuest 1 CD
svn-id: r43875
This commit is contained in:
@@ -301,7 +301,9 @@ reg_t kDisposeScript(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||
Script *scr = s->segmentManager->getScriptIfLoaded(id);
|
||||
if (scr) {
|
||||
if (s->_executionStack.back().addr.pc.segment != id)
|
||||
scr->setLockers(1);
|
||||
// Lockers must be > 1, otherwise it won't have any effect on script_uninstantiate() below,
|
||||
// because it decreases the lockers by 1. This occurs for example at the beginning of EcoQuest CD
|
||||
scr->setLockers(2);
|
||||
}
|
||||
|
||||
script_uninstantiate(s->segmentManager, script);
|
||||
|
||||
Reference in New Issue
Block a user