Nodes Viewer plugin: added a sanity check.

This commit is contained in:
MaxED 2015-01-09 08:34:27 +00:00
parent a531e41a50
commit 8238ae9138

View file

@ -439,6 +439,10 @@ namespace CodeImp.DoomBuilder.Plugins.NodesViewer
{
Split s;
Seg sg = segs[ssectors[ss].firstseg + i];
//mxd. Sanity check, because some segs in Doom maps refer to non-existing verts.
if(sg.startvertex > verts.Length - 1 || sg.endvertex > verts.Length - 1) continue;
s.pos = verts[sg.startvertex];
s.delta = verts[sg.endvertex] - verts[sg.startvertex];
CropPolygon(poly, s);