Fix crash in bhv_piranha_plant_bubble_loop

This commit is contained in:
MysterD 2022-05-09 05:10:53 -07:00
parent 1022527004
commit e6bc87fa80
1 changed files with 2 additions and 0 deletions

View File

@ -28,10 +28,12 @@ void bhv_piranha_plant_waking_bubbles_loop(void) {
*/ */
void bhv_piranha_plant_bubble_loop(void) { void bhv_piranha_plant_bubble_loop(void) {
struct Object *parent = o->parentObj; // the Piranha Plant struct Object *parent = o->parentObj; // the Piranha Plant
if (parent == NULL) { return; }
f32 scale = 0; f32 scale = 0;
s32 i; s32 i;
s32 frame = parent->header.gfx.animInfo.animFrame; s32 frame = parent->header.gfx.animInfo.animFrame;
// TODO: rename lastFrame if it is inaccurate // 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 lastFrame = parent->header.gfx.animInfo.curAnim->loopEnd - 2;
s32 UNUSED unused; s32 UNUSED unused;
f32 doneShrinkingFrame; // the first frame after shrinking is done f32 doneShrinkingFrame; // the first frame after shrinking is done