diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-02-06 22:11:06 +0100 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-02-06 22:11:06 +0100 |
| commit | 84e73448f2467e733f6037f795e26f49997d3cd1 (patch) | |
| tree | 488f69ccc98411bf921f373eac68519371e16586 /src | |
| parent | 20a1f4d28ecc708ba20d36af5b46943c1639d20b (diff) | |
Core/Spells: Possible crash fix
Get Unit target with the proper method instead of retrieving Object target and then casting it to Unit, possible dereferencing NULL.
Updates #11560
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 9098ac96376..bf6f95d8c92 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3020,7 +3020,7 @@ void Spell::cast(bool skipCheck) if (this->GetSpellInfo()->DmgClass != SPELL_DAMAGE_CLASS_NONE) if (Pet* playerPet = playerCaster->GetPet()) if (playerPet->IsAlive() && playerPet->isControlled() && (m_targets.GetTargetMask() & TARGET_FLAG_UNIT)) - playerPet->AI()->OwnerAttacked(m_targets.GetObjectTarget()->ToUnit()); + playerPet->AI()->OwnerAttacked(m_targets.GetUnitTarget()); } SetExecutedCurrently(true); |
