Core/Creatures: Fixed crash when guards get killed by periodic auras whose caster is offline or despawned

This commit is contained in:
Shauren authored and Ovahlord committed 2020-04-04 18:51:57 +02:00
1 parent e69cd41669
commit a853bacd1d
1 file changed
+3 -2
+3 -2
View File
@@ -78,6 +78,7 @@ void GuardAI::EnterEvadeMode(EvadeReason /*why*/)
void GuardAI::JustDied(Unit* killer)
{
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
me->SendZoneUnderAttackMessage(player);
if (killer)
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
me->SendZoneUnderAttackMessage(player);
}