mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
- fixed potential null pointer access in Hexen's spike code.
This commit is contained in:
parent
4d14642cad
commit
2c9a82e084
1 changed files with 20 additions and 17 deletions
|
@ -179,7 +179,9 @@ class ThrustFloor : Actor
|
||||||
while (it.Next())
|
while (it.Next())
|
||||||
{
|
{
|
||||||
let targ = it.thing;
|
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)
|
if (abs(targ.pos.x - it.Position.X) >= blockdist || abs(targ.pos.y - it.Position.Y) >= blockdist)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -202,6 +204,7 @@ class ThrustFloor : Actor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Spike up -----------------------------------------------------------------
|
// Spike up -----------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue