From 8d5ab43f66d3beb88611eed7acaf762e903a2246 Mon Sep 17 00:00:00 2001 From: MysterD Date: Tue, 1 Mar 2022 18:02:54 -0800 Subject: [PATCH] Possible crash fix --- src/game/object_helpers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/object_helpers.c b/src/game/object_helpers.c index b9a5ef87..ec4792e9 100644 --- a/src/game/object_helpers.c +++ b/src/game/object_helpers.c @@ -2464,6 +2464,7 @@ s32 cur_obj_is_mario_on_platform(void) { s32 cur_obj_is_any_player_on_platform(void) { for (int i = 0; i < MAX_PLAYERS; i++) { if (!is_player_active(&gMarioStates[i])) { continue; } + if (gMarioStates[i].marioObj == NULL) { continue; } if (gMarioStates[i].marioObj->platform == o) { return TRUE; }