diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index f969304e..6e769847 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -984,7 +984,7 @@ u32 get_object_list_from_behavior(const BehaviorScript *behavior) { // If the first behavior command is "begin", then get the object list header // from there - if ((behavior[0] >> 24) == 0) { + if (behavior && (behavior[0] >> 24) == 0) { objectList = (behavior[0] >> 16) & 0xFFFF; } else { objectList = OBJ_LIST_DEFAULT;