diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 68ee6de1f..57254bb22 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -106,7 +106,7 @@ void SerializeActorGlobals(FSerializer& arc) bool ceilingspace_d(sectortype* sectp) { - if( (sectp->ceilingstat&1) && sectp->ceilingpal == 0 ) + if (sectp && (sectp->ceilingstat&1) && sectp->ceilingpal == 0) { switch(sectp->ceilingpicnum) { diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index ce715ca60..a38c5caec 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -53,7 +53,7 @@ void resetlanepics(void); bool ceilingspace_r(sectortype* sectp) { - if( (sectp->ceilingstat&1) && sectp->ceilingpal == 0 ) + if (sectp && (sectp->ceilingstat&1) && sectp->ceilingpal == 0) { switch(sectp->ceilingpicnum) {