mirror of https://github.com/yquake2/xatrix.git
Add a missing sanity check. attacker->classname may be NULL.
This was reported by maraakate in issue #170.
This commit is contained in:
parent
2cda032cee
commit
cc3b204e5a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue