fix potential segfault (found by DerSaidin in xreal)
This commit is contained in:
1 parent
f5aae78481
commit
f2198c70e7
1 file changed
+2
-1
@@ -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 ) ) {
|
||||
|
||||
Reference in new issue
Block a user