Added NULL check to lines.

This commit is contained in:
MajorCooke 2016-01-16 16:36:42 -06:00
parent e4a74e91fc
commit 421dcacb94

View file

@ -4294,7 +4294,7 @@ void P_RailAttack(AActor *source, int damage, int offset_xy, fixed_t offset_z, i
if (puffclass != NULL && puffDefaults->flags3 & MF3_ALWAYSPUFF)
{
puff = P_SpawnPuff(source, puffclass, trace.X, trace.Y, trace.Z, (source->angle + angleoffset) - ANG90, 1, 0);
if (puff && (trace.Line->special == Line_Horizon) && !(puff->flags3 & MF3_SKYEXPLODE))
if (puff && (trace.Line != NULL) && (trace.Line->special == Line_Horizon) && !(puff->flags3 & MF3_SKYEXPLODE))
puff->Destroy();
}
if (puff != NULL && puffDefaults->flags7 & MF7_FORCEDECAL && puff->DecalGenerator)