From 03e45f459008315749cecc8a04c0c83be10ae039 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 46fb35f65..2b120b99c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3141,7 +3141,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); @@ -3179,7 +3179,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);