Fix crash in execute_mario_action()

This commit is contained in:
MysterD 2023-05-14 12:28:31 -07:00
parent 5598ac95e7
commit c159fabeb7
1 changed files with 3 additions and 0 deletions

View File

@ -2010,6 +2010,9 @@ static u8 prevent_hang(u32 hangPreventionActions[], u8* hangPreventionIndex) {
*/ */
s32 execute_mario_action(UNUSED struct Object *o) { s32 execute_mario_action(UNUSED struct Object *o) {
s32 inLoop = TRUE; s32 inLoop = TRUE;
if (!gMarioState) { return 0; }
if (!gMarioState->marioObj) { return 0; }
if (gMarioState->playerIndex >= MAX_PLAYERS) { return 0; }
if (gMarioState->knockbackTimer > 0) { if (gMarioState->knockbackTimer > 0) {
gMarioState->knockbackTimer--; gMarioState->knockbackTimer--;