Fix crash in bhv_mario_update()

This commit is contained in:
MysterD 2023-05-01 17:03:01 -07:00
parent 2c349e66db
commit 2412056ab1
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ void bhv_mario_update(void) {
// sanity check torsoPos, it isn't updated off-screen otherwise
extern u32 gGlobalTimer;
if (gMarioState->marioBodyState->updateTorsoTime != (gGlobalTimer - 1)) {
if (gMarioState->marioBodyState && gMarioState->marioBodyState->updateTorsoTime != (gGlobalTimer - 1)) {
vec3f_copy(gMarioState->marioBodyState->torsoPos, gMarioState->pos);
}