- added a missing NULL pointer check in software rendering code.

This commit is contained in:
Christoph Oelckers 2016-01-19 10:50:01 +01:00
parent 069889c5ce
commit 4df8c12534
1 changed files with 2 additions and 2 deletions

View File

@ -1088,7 +1088,7 @@ void R_Subsector (subsector_t *sub)
} }
skybox = frontsector->GetSkyBox(sector_t::ceiling); 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 || ceilingplane = frontsector->ceilingplane.PointOnSide(viewx, viewy, viewz) > 0 ||
frontsector->GetTexture(sector_t::ceiling) == skyflatnum || 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 // killough 10/98: add support for skies transferred from sidedefs
skybox = frontsector->GetSkyBox(sector_t::floor); 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 floorplane = frontsector->floorplane.PointOnSide(viewx, viewy, viewz) > 0 || // killough 3/7/98
frontsector->GetTexture(sector_t::floor) == skyflatnum || frontsector->GetTexture(sector_t::floor) == skyflatnum ||