Fix crash in is_anim_past_frame()

This commit is contained in:
MysterD 2023-04-10 17:50:57 -07:00
parent 03c172fa9e
commit 9ffd99473d
1 changed files with 4 additions and 0 deletions

View File

@ -176,7 +176,11 @@ void set_anim_to_frame(struct MarioState *m, s16 animFrame) {
s32 is_anim_past_frame(struct MarioState *m, s16 animFrame) {
s32 isPastFrame;
s32 acceleratedFrame = animFrame << 0x10;
if (!m || !m->marioObj) { return TRUE; }
struct AnimInfo *animInfo = &m->marioObj->header.gfx.animInfo;
if (!animInfo->curAnim) { return TRUE; }
struct Animation *curAnim = animInfo->curAnim;
if (animInfo->animAccel) {