From a7e99a3bd1df304c9c8cb0be6b1da808d3581f3e Mon Sep 17 00:00:00 2001 From: Mitch Richters Date: Tue, 7 Dec 2021 19:12:29 +1100 Subject: [PATCH] - Duke/RR: Do nullptr test in `ceilingspace_r()` after receiving crash in Redneck Rampage Route 66 (do Duke for parity). --- source/games/duke/src/actors_d.cpp | 2 +- source/games/duke/src/actors_r.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) {