- fixed crash when trying to cache nodes for a map that has no two-sided walls and no minisegs.

Under these conditions there are no partner segs and the glsegextras array is NULL.
This commit is contained in:
Christoph Oelckers 2016-01-31 01:05:31 +01:00
parent 5c13b86ad1
commit 939989dc8c

View file

@ -1114,7 +1114,8 @@ static void CreateCachedNodes(MapData *map)
for(int i=0;i<numsegs;i++)
{
WriteLong(ZNodes, DWORD(segs[i].v1 - vertexes));
WriteLong(ZNodes, DWORD(glsegextras[i].PartnerSeg));
if (glsegextras != NULL) WriteLong(ZNodes, DWORD(glsegextras[i].PartnerSeg));
else WriteLong(ZNodes, 0);
if (segs[i].linedef)
{
WriteLong(ZNodes, DWORD(segs[i].linedef - lines));