- do not crash on badly defined walls where the end point is missing.

This commit is contained in:
Christoph Oelckers 2021-08-30 23:15:53 +02:00
parent 585f841f96
commit 6dcd7e2557

View file

@ -346,6 +346,7 @@ bool SectorGeometry::MakeVertices2(unsigned int secnum, int plane, const FVector
for (int i = 0; i < numvertices; i++) for (int i = 0; i < numvertices; i++)
{ {
auto sline = &sectionLines[sec->lines[i]]; auto sline = &sectionLines[sec->lines[i]];
if (sline->point2index < 0) continue; // Exhumed LEV14 triggers this on sector 169.
auto wallp = &wall[sline->startpoint]; auto wallp = &wall[sline->startpoint];
vertexes[j].p = { wallp->x * (1 / 16.), wallp->y * (1 / -16.) }; vertexes[j].p = { wallp->x * (1 / 16.), wallp->y * (1 / -16.) };