Fix crash in bhv_piranha_plant_bubble_loop

This commit is contained in:
MysterD 2022-05-09 05:10:53 -07:00
parent 059842b600
commit dd6959fe90
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) {
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