Add a missing sanity check. attacker->classname may be NULL.

This was reported by maraakate in issue #170.
This commit is contained in:
Yamagi Burmeister 2017-03-13 14:28:06 +01:00
parent 2cda032cee
commit cc3b204e5a
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ Killed(edict_t *targ, edict_t *inflictor, edict_t *attacker,
} }
/* medics won't heal monsters that they kill themselves */ /* medics won't heal monsters that they kill themselves */
if (strcmp(attacker->classname, "monster_medic") == 0) if (attacker && attacker->classname && strcmp(attacker->classname, "monster_medic") == 0)
{ {
targ->owner = attacker; targ->owner = attacker;
} }