From 894c4198b09bb94d432a7c3bd67631bc7983b9ab Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 13 May 2013 02:27:39 +0000 Subject: [PATCH] - Fixed possible NULL pointer deref in A_FireBullets SVN r4263 (trunk) --- src/thingdef/thingdef_codeptr.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 95fc1639e..e7b26cb49 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -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) {