aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/script_e2.cpp
diff options
context:
space:
mode:
authorTravis Howell2009-03-20 09:59:40 +0000
committerTravis Howell2009-03-20 09:59:40 +0000
commit356e803a955a30e31a25b4ea0473397c7eba1bf0 (patch)
tree8206dabfa753772638b1481499635e01eb47fa25 /engines/agos/script_e2.cpp
parent931c8c27e204f61417454ebe02fca33847d80d2c (diff)
downloadscummvm-rg350-356e803a955a30e31a25b4ea0473397c7eba1bf0.tar.gz
scummvm-rg350-356e803a955a30e31a25b4ea0473397c7eba1bf0.tar.bz2
scummvm-rg350-356e803a955a30e31a25b4ea0473397c7eba1bf0.zip
Add work around for bug #2686883 - WAXWORKS: Crash in Jack the Ripper Zone.
svn-id: r39557
Diffstat (limited to 'engines/agos/script_e2.cpp')
-rw-r--r--engines/agos/script_e2.cpp10
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);
}