From 4df8c12534cf4372f5c40b4043d017cb5be4f769 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 19 Jan 2016 10:50:01 +0100 Subject: [PATCH] - added a missing NULL pointer check in software rendering code. --- src/r_bsp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index 09c39b49e2..397d29f9b6 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -1088,7 +1088,7 @@ void R_Subsector (subsector_t *sub) } skybox = frontsector->GetSkyBox(sector_t::ceiling); - if (skybox->special1 != SKYBOX_MAP) skybox = NULL; // HW renderer only. + if (skybox != NULL && skybox->special1 != SKYBOX_MAP) skybox = NULL; // HW renderer only. ceilingplane = frontsector->ceilingplane.PointOnSide(viewx, viewy, viewz) > 0 || frontsector->GetTexture(sector_t::ceiling) == skyflatnum || @@ -1131,7 +1131,7 @@ void R_Subsector (subsector_t *sub) // killough 10/98: add support for skies transferred from sidedefs skybox = frontsector->GetSkyBox(sector_t::floor); - if (skybox->special1 != SKYBOX_MAP) skybox = NULL; // HW renderer only. + if (skybox != NULL && skybox->special1 != SKYBOX_MAP) skybox = NULL; // HW renderer only. floorplane = frontsector->floorplane.PointOnSide(viewx, viewy, viewz) > 0 || // killough 3/7/98 frontsector->GetTexture(sector_t::floor) == skyflatnum ||