aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/script_v6.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 3bee1b9336..d518e09643 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -1327,7 +1327,10 @@ void Scumm_v6::o6_isActorInBox()
{
int box = pop();
Actor *a = derefActorSafe(pop(), "o6_isActorInBox");
- push(checkXYInBoxBounds(box, a->x, a->y));
+ if(!a)
+ push(0); // FIXME: DIG seems to call this with an invalid actor id
+ else
+ push(checkXYInBoxBounds(box, a->x, a->y));
}
void Scumm_v6::o6_getActorLayer()