- don’t crash on sector-less walls.

This commit is contained in:
Christoph Oelckers 2022-04-19 13:39:26 +02:00
parent f5579caa8f
commit c4bfee070e

View file

@ -71,7 +71,7 @@ void CreateVertexMap()
if (processed[w]) return; // broken wall setups can trigger this.
walls.Push(w);
processed.Set(w);
if (!sectors.Contains(wal->sector))
if ((unsigned)wal->sector < sector.Size() && !sectors.Contains(wal->sector))
{
sectors.Push(wal->sector);
countpersector[wal->sector]++;