From 3283ec9950bb1049b7fbb234061d20ed80788802 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+Agent-11@users.noreply.github.com> Date: Tue, 31 Jan 2023 05:55:55 -0500 Subject: [PATCH] Sanity check. (#259) --- src/game/paintings.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/paintings.c b/src/game/paintings.c index 0c0b9d77b..c55dac837 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -872,6 +872,7 @@ void painting_update_floors(struct Painting *painting) { enterRight = 0; struct Surface* surface; find_floor(m->marioObj->oPosX, m->marioObj->oPosY, m->marioObj->oPosZ, &surface); + if (surface == NULL) { continue; } s16 floorType = surface->type; /* The area in front of every painting in the game (except HMC and CotMC, which *\