From 356e803a955a30e31a25b4ea0473397c7eba1bf0 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 20 Mar 2009 09:59:40 +0000 Subject: Add work around for bug #2686883 - WAXWORKS: Crash in Jack the Ripper Zone. svn-id: r39557 --- engines/agos/script_e2.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'engines/agos/script_e2.cpp') 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); } -- cgit v1.2.3