Skip to content

Commit

Permalink
fix(Core/GuardAI): crash when killer is null (azerothcore#20100)
Browse files Browse the repository at this point in the history
  • Loading branch information
walkline authored Sep 30, 2024
1 parent 784e806 commit 8047694
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/game/AI/CoreAI/GuardAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ void GuardAI::EnterEvadeMode(EvadeReason /*why*/)

void GuardAI::JustDied(Unit* killer)
{
if (!killer)
return;

if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
me->SendZoneUnderAttackMessage(player);
}

0 comments on commit 8047694

Please sign in to comment.