Fix crash in is_anim_past_frame()

This commit is contained in:
MysterD 2023-04-10 17:50:57 -07:00
parent 471fea6073
commit c90e89b4fb
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) {