aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-09-01 06:45:30 +0000
committerFilippos Karapetis2009-09-01 06:45:30 +0000
commit267bbb2bb4e58253f30d03360cdec1abe4822b36 (patch)
tree7cd684fc9a138f24bddf5529ac4d95901cf10f23 /engines
parent814a37846e0229b73a72f74c325548d521b13048 (diff)
downloadscummvm-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.cpp4
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);