- fixed vertexscan crashing on bad walls.

This commit is contained in:
Christoph Oelckers 2021-12-29 23:41:24 +01:00
parent f9cea2b1db
commit 4d8028831b

View file

@ -138,7 +138,8 @@ void vertexscan(walltype* startwall, func mark)
while (true)
{
auto thelastwall = wal->lastWall();
if (!thelastwall->twoSided()) break;
// thelastwall can be null here if the map is bogus.
if (!thelastwall || !thelastwall->twoSided()) break;
wal = thelastwall->nextWall();
if (walbitmap.Check(wall.IndexOf(wal))) break;