- Duke: Apply same nullptr fix in 2e7496888a to prelevel_r(), and rename sect to sectp for 1:1 match between _d.cpp and _r.cpp files.

This commit is contained in:
Mitch Richters 2021-12-07 19:41:18 +11:00
parent 2e7496888a
commit 96867e15d5

View file

@ -722,16 +722,16 @@ void prelevel_r(int g)
if (wal->overpicnum == MIRROR && (wal->cstat & 32) != 0) if (wal->overpicnum == MIRROR && (wal->cstat & 32) != 0)
{ {
auto sect = wal->nextSector(); auto sectp = wal->nextSector();
if (mirrorcnt > 63) if (mirrorcnt > 63)
I_Error("Too many mirrors (64 max.)"); I_Error("Too many mirrors (64 max.)");
if (sect->ceilingpicnum != MIRROR) if (sectp && sectp->ceilingpicnum != MIRROR)
{ {
sect->ceilingpicnum = MIRROR; sectp->ceilingpicnum = MIRROR;
sect->floorpicnum = MIRROR; sectp->floorpicnum = MIRROR;
mirrorwall[mirrorcnt] = wal; mirrorwall[mirrorcnt] = wal;
mirrorsector[mirrorcnt] = sect; mirrorsector[mirrorcnt] = sectp;
mirrorcnt++; mirrorcnt++;
continue; continue;
} }