Fixed crash in get_object_list_from_behavior()

This commit is contained in:
MysterD 2023-04-24 01:17:46 -07:00
parent 5113e9e99c
commit 5cf9a835af

View file

@ -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 // If the first behavior command is "begin", then get the object list header
// from there // from there
if ((behavior[0] >> 24) == 0) { if (behavior && (behavior[0] >> 24) == 0) {
objectList = (behavior[0] >> 16) & 0xFFFF; objectList = (behavior[0] >> 16) & 0xFFFF;
} else { } else {
objectList = OBJ_LIST_DEFAULT; objectList = OBJ_LIST_DEFAULT;