aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/script.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 9561d337ef..719d01162c 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -310,6 +310,16 @@ void Script::incrementLockers() {
void Script::decrementLockers() {
if (_lockers > 0)
_lockers--;
+
+ // WORKAROUND for bug #3038837: HOYLE3: EGA/VGA Crashes
+ // This is caused by script 0 lockers reaching zero. Since
+ // this should never happen, I'm confident in making this a
+ // non-specific fix.
+ //
+ // TODO: Figure out why this happens, and fix it properly!
+ if (_nr == 0 && _lockers == 0)
+ _lockers++;
+
}
int Script::getLockers() const {