Possible crash fix

This commit is contained in:
MysterD 2022-03-01 18:02:54 -08:00
parent c007688302
commit 27b239eef6
1 changed files with 1 additions and 0 deletions

View File

@ -2464,6 +2464,7 @@ s32 cur_obj_is_mario_on_platform(void) {
s32 cur_obj_is_any_player_on_platform(void) { s32 cur_obj_is_any_player_on_platform(void) {
for (int i = 0; i < MAX_PLAYERS; i++) { for (int i = 0; i < MAX_PLAYERS; i++) {
if (!is_player_active(&gMarioStates[i])) { continue; } if (!is_player_active(&gMarioStates[i])) { continue; }
if (gMarioStates[i].marioObj == NULL) { continue; }
if (gMarioStates[i].marioObj->platform == o) { if (gMarioStates[i].marioObj->platform == o) {
return TRUE; return TRUE;
} }