From 90b49b4e6f7fdfb676ace9e81e1d4bb6b8f86d34 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 13 Feb 2022 15:54:12 -0800 Subject: [PATCH] Fixed painting crash - when shoved OOB in a wobbly painting room --- src/game/paintings.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/paintings.c b/src/game/paintings.c index a304d4ae..5301901e 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -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;