diff options
Diffstat (limited to 'src')
-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 67ae4ebb115..0adbf47633a 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)) |