fix(Core/GuardAI): crash when killer is null (#20100)
This commit is contained in:
committed by
GitHub
parent
784e80668d
commit
804769400b
@@ -60,6 +60,9 @@ void GuardAI::EnterEvadeMode(EvadeReason /*why*/)
|
|||||||
|
|
||||||
void GuardAI::JustDied(Unit* killer)
|
void GuardAI::JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
|
if (!killer)
|
||||||
|
return;
|
||||||
|
|
||||||
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||||
me->SendZoneUnderAttackMessage(player);
|
me->SendZoneUnderAttackMessage(player);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user