diff options
-rw-r--r-- | src/server/game/AI/CoreAI/PetAI.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index 4e18160e553..f3f0596bb65 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -487,7 +487,11 @@ bool PetAI::CanAttack(Unit* target) return false; } - ASSERT(me->GetCharmInfo()); + if (!me->GetCharmInfo()) + { + TC_LOG_ERROR("scripts.ai.petai", "me->GetCharmInfo() is NULL in PetAI::CanAttack(). Debug info: %s", GetDebugInfo().c_str()); + return false; + } // Passive - passive pets can attack if told to if (me->HasReactState(REACT_PASSIVE)) |