From e9c35d269d2fbb22e32a39e90caf8b8163d07f6b Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 7 Jan 2025 16:28:38 +0100 Subject: [PATCH] check for cam subsector since we can move it around and i added this to freecam mode, subsector may be null for reason so better be safe than sorry --- src/p_mobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 0f7b5f389..715346323 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3221,7 +3221,7 @@ static boolean P_CameraCheckHeat(camera_t *thiscam) sector_t *sector; fixed_t halfheight; - if (!thiscam) + if (!thiscam || !thiscam->subsector) return false; halfheight = thiscam->z + (thiscam->height >> 1); @@ -3259,7 +3259,7 @@ static boolean P_CameraCheckWater(camera_t *thiscam) sector_t *sector; fixed_t halfheight; - if (!thiscam) + if (!thiscam || !thiscam->subsector) return false; halfheight = thiscam->z + (thiscam->height >> 1);