diff options
-rw-r--r-- | engines/agos/script_e2.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp index 8802ed921d..afcf14fb76 100644 --- a/engines/agos/script_e2.cpp +++ b/engines/agos/script_e2.cpp @@ -414,6 +414,16 @@ void AGOSEngine_Elvira2::oe2_ifDoorOpen() { // 148: if door open Item *i = getNextItemPtr(); uint16 d = getVarOrByte(); + + if (getGameType() == GType_WW) { + // WORKAROUND bug #2686883: A NULL item can occur when + // walking through Jack the Ripper scene + if (i == NULL) { + setScriptCondition(false); + return; + } + } + setScriptCondition(getDoorState(i, d) == 1); } |