diff --git a/src/p_mobj.c b/src/p_mobj.c index fc09fcf0a..8cbf709c5 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -3150,7 +3150,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); @@ -3188,7 +3188,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);