Fixed crash during line tracing when enter sector is null

https://forum.zdoom.org/viewtopic.php?t=60371
This commit is contained in:
alexey.lysiuk 2018-04-26 16:55:06 +03:00 committed by Christoph Oelckers
parent 10b869ba11
commit 3111ec97bb

View file

@ -637,7 +637,7 @@ cont:
case TRACE_Skip:
Results->HitType = TRACE_HitNone;
if (!special3dpass && (TraceFlags & TRACE_3DCallback) && entersector->e->XFloor.ffloors.Size())
if (!special3dpass && (TraceFlags & TRACE_3DCallback) && entersector && entersector->e->XFloor.ffloors.Size())
return LineCheck(in, dist, hit, true);
break;
@ -646,7 +646,7 @@ cont:
}
}
if (Results->HitType == TRACE_HitNone)
if (Results->HitType == TRACE_HitNone && entersector)
{
CurSector = entersector;
EnterDist = dist;