diff options
author | James Brown | 2002-06-26 11:32:21 +0000 |
---|---|---|
committer | James Brown | 2002-06-26 11:32:21 +0000 |
commit | 242e99eeb9c7020c53f434a112fe7ed428c3256b (patch) | |
tree | 11cb61b1194ed9a0554b298b70b1fd79a9effc62 | |
parent | 4c599f2db8c9102ddd378c668ed0bd2b0620daee (diff) | |
download | scummvm-rg350-242e99eeb9c7020c53f434a112fe7ed428c3256b.tar.gz scummvm-rg350-242e99eeb9c7020c53f434a112fe7ed428c3256b.tar.bz2 scummvm-rg350-242e99eeb9c7020c53f434a112fe7ed428c3256b.zip |
Add invalid variable checks for The Dig
svn-id: r4431
-rw-r--r-- | script_v2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script_v2.cpp b/script_v2.cpp index 800e4e56c7..2bf573dcdc 100644 --- a/script_v2.cpp +++ b/script_v2.cpp @@ -2369,7 +2369,7 @@ void Scumm::o6_wait() case 226:{ /* wait until actor drawn */ Actor *a = derefActorSafe(pop(), "o6_wait:226"); int offs = (int16) fetchScriptWord(); - if (a->isInCurrentRoom() && a->needRedraw) { + if (a && a->isInCurrentRoom() && a->needRedraw) { _scriptPointer += offs; o6_breakHere(); } @@ -2378,7 +2378,7 @@ void Scumm::o6_wait() case 232:{ /* wait until actor stops turning */ Actor *a = derefActorSafe(pop(), "o6_wait:226"); int offs = (int16) fetchScriptWord(); - if (a->isInCurrentRoom() && a->moving & MF_TURN) { + if (a && a->isInCurrentRoom() && a->moving & MF_TURN) { _scriptPointer += offs; o6_breakHere(); } |