- Fixed possible NULL pointer deref in A_CustomPunch

SVN r4255 (trunk)
This commit is contained in:
Randy Heit 2013-05-12 18:31:36 +00:00
parent e130150af0
commit c63273348a

View file

@ -1409,7 +1409,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_CustomPunch)
if (LifeSteal)
P_GiveBody (self, (Damage * LifeSteal) >> FRACBITS);
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
if (weapon != NULL)
{
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
}
self->angle = R_PointToAngle2 (self->x,
self->y,