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

Fixes and closes #16728.

(cherry picked from commit 49de12b1cfaca7f089a1ba2660de4a8644a72e2c)
This commit is contained in:
treeston
2016-04-08 23:58:45 +02:00
committed by Shauren
parent 8e8758d857
commit 6eb49e4bb2
+2
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())