aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/he/script_v90he.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index 3759cf7b88..61fc1d5f30 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -2347,7 +2347,10 @@ void ScummEngine_v90he::o90_getObjectData() {
push(_objs[_heObjectNum].height);
break;
case 4:
- push(getObjectImageCount(_heObject));
+ if (_heObjectNum == -1)
+ push(0);
+ else
+ push(getObjectImageCount(_heObject));
break;
case 6:
if (_heObjectNum == -1)