- fixed potential null pointer access in Hexen's spike code.

This commit is contained in:
Christoph Oelckers 2018-10-07 19:59:51 +02:00
parent 4d14642cad
commit 2c9a82e084

View file

@ -179,7 +179,9 @@ class ThrustFloor : Actor
while (it.Next())
{
let targ = it.thing;
double blockdist = radius + it.thing.radius;
if (targ != null)
{
double blockdist = radius + targ.radius;
if (abs(targ.pos.x - it.Position.X) >= blockdist || abs(targ.pos.y - it.Position.Y) >= blockdist)
continue;
@ -201,6 +203,7 @@ class ThrustFloor : Actor
args[1] = 1; // Mark thrust thing as bloody
}
}
}
}
// Spike up -----------------------------------------------------------------