From 6378681e9610e165576ed86b9f4e3ac5016fe733 Mon Sep 17 00:00:00 2001 From: David Joslin 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 26bf2edf..b791b7b4 100644 --- a/src/game/camera.c +++ b/src/game/camera.c @@ -7150,6 +7150,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;