From c4bfee070e3f9ae0b4cac4c5524524a1162ed0ca Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 19 Apr 2022 13:39:26 +0200 Subject: [PATCH] =?UTF-8?q?-=20don=E2=80=99t=20crash=20on=20sector-less=20?= =?UTF-8?q?walls.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/core/rendering/hw_vertexmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/rendering/hw_vertexmap.cpp b/source/core/rendering/hw_vertexmap.cpp index 3f19320788a..6d977fd03a4 100644 --- a/source/core/rendering/hw_vertexmap.cpp +++ b/source/core/rendering/hw_vertexmap.cpp @@ -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]++;