From cad3a7bea336ea7ec59e2fb4c7a67312c7b106fc Mon Sep 17 00:00:00 2001 From: ludwig Date: Fri, 23 Jan 2009 20:12:45 +0000 Subject: fix potential segfault (found by DerSaidin in xreal) git-svn-id: svn://svn.icculus.org/quake3/trunk@1494 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/game/g_combat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/g_combat.c b/code/game/g_combat.c index e24b6fa..6538656 100644 --- a/code/game/g_combat.c +++ b/code/game/g_combat.c @@ -974,7 +974,8 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker, } // add to the attacker's hit counter (if the target isn't a general entity like a prox mine) - if ( attacker->client && targ != attacker && targ->health > 0 + if ( attacker->client && client + && targ != attacker && targ->health > 0 && targ->s.eType != ET_MISSILE && targ->s.eType != ET_GENERAL) { if ( OnSameTeam( targ, attacker ) ) { -- cgit v1.2.3