From f7056976ace246b3d257b72baacc8cf91ab3c822 Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 21 Mar 2022 12:25:06 -0700 Subject: [PATCH] Fix crash in spawn_default_star() --- src/game/behaviors/spawn_star.inc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/behaviors/spawn_star.inc.c b/src/game/behaviors/spawn_star.inc.c index e72ddd3e..e15e48be 100644 --- a/src/game/behaviors/spawn_star.inc.c +++ b/src/game/behaviors/spawn_star.inc.c @@ -142,6 +142,7 @@ static u8 spawn_star_deduplication(u32* array, u8* count, u32 behParams) { struct Object* spawn_default_star(f32 x, f32 y, f32 z) { if (sCurrPlayMode != PLAY_MODE_NORMAL && sCurrPlayMode != PLAY_MODE_PAUSED) { return NULL; } + if (o == NULL) { return NULL; } u32 behParams = o->oBehParams; // de-duplication checking