- fixed: The textured automap node initialization code could crash on maps that only have single isolated sectors.

SVN r2618 (trunk)
This commit is contained in:
Christoph Oelckers 2010-08-28 12:00:42 +00:00
parent 5a9151d7d2
commit 80f1a63cc9
1 changed files with 13 additions and 0 deletions

View File

@ -1414,6 +1414,19 @@ void P_SetRenderSector()
#endif
// Check for incorrect partner seg info so that the following code does not crash.
if (glsegextras == NULL)
{
// This can be normal nodes, mistakenly identified as GL nodes so we must fill
// in the missing pieces differently.
for (i = 0; i < numsubsectors; i++)
{
ss = &subsectors[i];
ss->render_sector = ss->sector;
}
return;
}
for(i=0;i<numsegs;i++)
{
int partner = (int)glsegextras[i].PartnerSeg;