From e6bc87fa80b1029cb11c878ff663859bde062c0a Mon Sep 17 00:00:00 2001 From: MysterD Date: Mon, 9 May 2022 05:10:53 -0700 Subject: [PATCH] Fix crash in bhv_piranha_plant_bubble_loop --- src/game/behaviors/piranha_bubbles.inc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/behaviors/piranha_bubbles.inc.c b/src/game/behaviors/piranha_bubbles.inc.c index f1d8dad1..52d7bdb0 100644 --- a/src/game/behaviors/piranha_bubbles.inc.c +++ b/src/game/behaviors/piranha_bubbles.inc.c @@ -28,10 +28,12 @@ void bhv_piranha_plant_waking_bubbles_loop(void) { */ void bhv_piranha_plant_bubble_loop(void) { struct Object *parent = o->parentObj; // the Piranha Plant + if (parent == NULL) { return; } f32 scale = 0; s32 i; s32 frame = parent->header.gfx.animInfo.animFrame; // TODO: rename lastFrame if it is inaccurate + if (parent->header.gfx.animInfo.curAnim == NULL) { return; } s32 lastFrame = parent->header.gfx.animInfo.curAnim->loopEnd - 2; s32 UNUSED unused; f32 doneShrinkingFrame; // the first frame after shrinking is done