mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- Fixed: Possible NULL deref in P_RailAttack.
SVN r4274 (trunk)
This commit is contained in:
parent
1d4fbc05a5
commit
5007571732
1 changed files with 6 additions and 9 deletions
|
@ -4071,24 +4071,21 @@ void P_RailAttack (AActor *source, int damage, int offset_xy, fixed_t offset_z,
|
|||
}
|
||||
|
||||
}
|
||||
if (trace.HitType == TRACE_HitFloor &&
|
||||
trace.CrossedWater == NULL &&
|
||||
trace.Sector->heightsec == NULL)
|
||||
if(thepuff != NULL)
|
||||
{
|
||||
if (thepuff != NULL)
|
||||
if (trace.HitType == TRACE_HitFloor &&
|
||||
trace.CrossedWater == NULL &&
|
||||
trace.Sector->heightsec == NULL)
|
||||
{
|
||||
thepuff->SetOrigin(trace.X, trace.Y, trace.Z);
|
||||
P_HitWater (thepuff, trace.Sector);
|
||||
}
|
||||
}
|
||||
if (trace.Crossed3DWater || trace.CrossedWater)
|
||||
{
|
||||
if (thepuff != NULL)
|
||||
if (trace.Crossed3DWater || trace.CrossedWater)
|
||||
{
|
||||
SpawnDeepSplash (source, trace, thepuff, vx, vy, vz, shootz, trace.Crossed3DWater != NULL);
|
||||
}
|
||||
thepuff->Destroy ();
|
||||
}
|
||||
thepuff->Destroy ();
|
||||
|
||||
// Draw the slug's trail.
|
||||
end.X = FIXED2FLOAT(trace.X);
|
||||
|
|
Loading…
Reference in a new issue