- Fixed possible NULL pointer deref in A_FireBullets

SVN r4263 (trunk)
This commit is contained in:
Randy Heit 2013-05-13 02:27:39 +00:00
parent 20d0cc717b
commit 894c4198b0

View file

@ -1247,7 +1247,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireBullets)
if (!PuffType) PuffType = PClass::FindClass(NAME_BulletPuff);
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
if (weapon != NULL)
{
S_Sound (self, CHAN_WEAPON, weapon->AttackSound, 1, ATTN_NORM);
}
if ((NumberOfBullets==1 && !player->refire) || NumberOfBullets==0)
{