Add work around for bug #2686883 - WAXWORKS: Crash in Jack the Ripper Zone.

svn-id: r39557
This commit is contained in:
Travis Howell 2009-03-20 09:59:40 +00:00
parent 931c8c27e2
commit 356e803a95

View File

@ -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);
}