aboutsummaryrefslogtreecommitdiffstats
path: root/code
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-01-23 20:12:45 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2009-01-23 20:12:45 +0000
commitcad3a7bea336ea7ec59e2fb4c7a67312c7b106fc (patch)
tree98445f048e98cfdbad5d8aa9a997d24727b8583a /code
parentb900e8e57ce8be0dfef6c4e79601a071b0932a46 (diff)
downloadioquake3-aero-cad3a7bea336ea7ec59e2fb4c7a67312c7b106fc.tar.gz
ioquake3-aero-cad3a7bea336ea7ec59e2fb4c7a67312c7b106fc.zip
fix potential segfault (found by DerSaidin in xreal)
git-svn-id: svn://svn.icculus.org/quake3/trunk@1494 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r--code/game/g_combat.c3
1 files changed, 2 insertions, 1 deletions
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 ) ) {