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

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 */
if (strcmp(attacker->classname, "monster_medic") == 0)
if (attacker && attacker->classname && strcmp(attacker->classname, "monster_medic") == 0)
{
targ->owner = attacker;
}