Fixed painting crash - when shoved OOB in a wobbly painting room

This commit is contained in:
MysterD 2022-02-13 15:54:12 -08:00
parent 15cdc199b5
commit 90b49b4e6f
1 changed files with 3 additions and 1 deletions

View File

@ -1311,7 +1311,9 @@ Gfx *geo_painting_update(s32 callContext, UNUSED struct GraphNode *node, UNUSED
// Store Mario's floor and position
find_floor(gMarioObject->oPosX, gMarioObject->oPosY, gMarioObject->oPosZ, &surface);
gPaintingMarioFloorType = surface->type;
if (surface != NULL) {
gPaintingMarioFloorType = surface->type;
}
gPaintingMarioXPos = gMarioObject->oPosX;
gPaintingMarioYPos = gMarioObject->oPosY;
gPaintingMarioZPos = gMarioObject->oPosZ;