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);