diff options
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/klists.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 342fa95eda..7e6c112b9f 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -801,7 +801,8 @@ reg_t kArray(EngineState *s, int argc, reg_t *argv) { #endif return NULL_REG; } - if (s->_segMan->getSegmentObj(argv[1].getSegment())->getType() != SEG_TYPE_ARRAY) + SegmentObj *sobj = s->_segMan->getSegmentObj(argv[1].getSegment()); + if (!sobj || sobj->getType() != SEG_TYPE_ARRAY) error("kArray(Dup): Request to duplicate a segment which isn't an array"); reg_t arrayHandle; |