- Duke/RR: Do nullptr test in floorspace_d()/floorspace_r() functions to match ceilingspace_*() functions.

This commit is contained in:
Mitch Richters 2021-12-07 19:13:22 +11:00
parent a7e99a3bd1
commit 85a2e3bd06
2 changed files with 2 additions and 2 deletions

View file

@ -126,7 +126,7 @@ bool ceilingspace_d(sectortype* sectp)
bool floorspace_d(sectortype* sectp) bool floorspace_d(sectortype* sectp)
{ {
if( (sectp->floorstat&1) && sectp->ceilingpal == 0 ) if (sectp && (sectp->floorstat&1) && sectp->ceilingpal == 0)
{ {
switch(sectp->floorpicnum) switch(sectp->floorpicnum)
{ {

View file

@ -74,7 +74,7 @@ bool ceilingspace_r(sectortype* sectp)
bool floorspace_r(sectortype* sectp) bool floorspace_r(sectortype* sectp)
{ {
if( (sectp->floorstat&1) && sectp->ceilingpal == 0 ) if (sectp && (sectp->floorstat&1) && sectp->ceilingpal == 0)
{ {
switch(sectp->floorpicnum) switch(sectp->floorpicnum)
{ {