From 5cf9a835af15eb287f5643dd3b676cad7fb71f6b Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 24 Apr 2023 01:17:46 -0700 Subject: [PATCH] Fixed crash in get_object_list_from_behavior() --- src/game/object_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;