From 477a601249f5d9d4b562b19737d1af2a53e841aa Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 18 Sep 2022 19:06:52 -0700 Subject: [PATCH] Fix crash in rippling paintings --- src/game/paintings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/paintings.c b/src/game/paintings.c index 0197ce55..0c0b9d77 100644 --- a/src/game/paintings.c +++ b/src/game/paintings.c @@ -845,6 +845,7 @@ void painting_update_floors(struct Painting *painting) { struct NetworkPlayer* np = &gNetworkPlayers[m->playerIndex]; // Skip non connected players if (!np->connected) { continue; } + if (m == NULL || m->marioObj == NULL) { continue; } bool consider = true; bool valid = true; @@ -870,7 +871,6 @@ void painting_update_floors(struct Painting *painting) { enterMiddle = 0; enterRight = 0; struct Surface* surface; - if (m == NULL || m->marioObj == NULL) { continue; } find_floor(m->marioObj->oPosX, m->marioObj->oPosY, m->marioObj->oPosZ, &surface); s16 floorType = surface->type;