From a359b28bb4d91aadc3530a80f620d49ea153c9a0 Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 18 Feb 2022 18:30:57 -0800 Subject: [PATCH] Fixed crash in bhv_bowser_loop --- src/game/behaviors/bowser.inc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/behaviors/bowser.inc.c b/src/game/behaviors/bowser.inc.c index 64b4e70b..d6393ba3 100644 --- a/src/game/behaviors/bowser.inc.c +++ b/src/game/behaviors/bowser.inc.c @@ -1246,9 +1246,11 @@ void bhv_bowser_loop(void) { int angleToPlayer = obj_angle_to_object(o, player); // look for animation difference and override - struct Animation* anim = o->oAnimations[networkBowserAnimationIndex]; - if (anim != NULL &&o->header.gfx.unk38.curAnim != anim) { - geo_obj_init_animation(&o->header.gfx, &anim); + if (o->oAnimations != NULL && networkBowserAnimationIndex <= 26) { + struct Animation* anim = o->oAnimations[networkBowserAnimationIndex]; + if (anim != NULL && o->header.gfx.unk38.curAnim != anim) { + geo_obj_init_animation(&o->header.gfx, &anim); + } } s16 angleToMario; // AngleToMario from Bowser's perspective