Unit/PlayerAI: Yeah, we allow charmer to be null now, should probably check for that.

Fixes and closes #16728.

(cherry picked from commit 49de12b1cf)
This commit is contained in:
treeston
2016-03-05 13:29:49 +01:00
committed by Shauren
parent 8e8758d857
commit 6eb49e4bb2

View File

@@ -147,6 +147,8 @@ Unit* SimpleCharmedPlayerAI::SelectAttackTarget() const
void SimpleCharmedPlayerAI::UpdateAI(const uint32 /*diff*/)
{
Creature* charmer = me->GetCharmer() ? me->GetCharmer()->ToCreature() : nullptr;
if (!charmer)
return;
//kill self if charm aura has infinite duration
if (charmer->IsInEvadeMode())