From 3585e20eee8cc112a96ff2fc6670be7c12d5cddc Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 8 Nov 2023 12:19:41 -0800 Subject: [PATCH] Fixed crash in find_mario_floor_and_ceil() --- src/game/camera.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/game/camera.c b/src/game/camera.c index ea435ef3..5321e1f2 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -7155,6 +7155,8 @@ s32 rotate_camera_around_walls(struct Camera *c, Vec3f cPos, s16 *avoidYaw, s16 */ void find_mario_floor_and_ceil(struct PlayerGeometry *pg) { if (!pg) { return; } + if (!sMarioCamState) { return; } + struct Surface *surf = NULL; s16 tempCheckingSurfaceCollisionsForCamera = gCheckingSurfaceCollisionsForCamera; gCheckingSurfaceCollisionsForCamera = TRUE;