diff options
author | Filippos Karapetis | 2009-09-01 06:45:30 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-09-01 06:45:30 +0000 |
commit | 267bbb2bb4e58253f30d03360cdec1abe4822b36 (patch) | |
tree | 7cd684fc9a138f24bddf5529ac4d95901cf10f23 /engines | |
parent | 814a37846e0229b73a72f74c325548d521b13048 (diff) | |
download | scummvm-rg350-267bbb2bb4e58253f30d03360cdec1abe4822b36.tar.gz scummvm-rg350-267bbb2bb4e58253f30d03360cdec1abe4822b36.tar.bz2 scummvm-rg350-267bbb2bb4e58253f30d03360cdec1abe4822b36.zip |
Fixed the crash at the beginning of EcoQuest 1 CD
svn-id: r43875
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kscripts.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 1ecba0d529..2419130bfa 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -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); |