- fixed a crash with GL nodes not having partner segs where both sides have a sidedef. This can happen for some render hacks.

This commit is contained in:
Christoph Oelckers 2017-01-11 10:46:26 +01:00
parent f4edaa2662
commit d1ce098d59

View file

@ -1488,7 +1488,7 @@ void P_SetRenderSector()
seg = ss->firstline;
for(j=0; j<ss->numlines; j++)
{
if(seg->sidedef && (seg->PartnerSeg == nullptr || seg->sidedef->sector!=seg->PartnerSeg->sidedef->sector))
if(seg->sidedef && (seg->PartnerSeg == nullptr || (seg->PartnerSeg->sidedef != nullptr && seg->sidedef->sector!=seg->PartnerSeg->sidedef->sector)))
{
ss->render_sector = seg->sidedef->sector;
break;