diff options
| author | jackpoz <giacomopoz@gmail.com> | 2014-04-20 00:38:25 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2014-04-20 00:38:25 +0200 |
| commit | fb6365ac689419a2e5dd758d4bf70c1a20ff41ff (patch) | |
| tree | 2fe3bd97242f12395e9a471b753947f037998cf0 /src/server/scripts/EasternKingdoms/SunwellPlateau | |
| parent | 8ca63717932ae6db48d74e866e8d379c4f5a5920 (diff) | |
Core/Misc: Check GetVictim() for NULL before dereferencing it
Add additional NULL checks all around the code before dereferencing GetVictim() result.
Keep in mind UpdateVictim() result has nothing to do with GetVictim() result and the caller shouldn't assume anything about GetVictim() based on UpdateVictim().
Diffstat (limited to 'src/server/scripts/EasternKingdoms/SunwellPlateau')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index a03455f6213..b57ffa7bc9c 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -298,7 +298,7 @@ public: Unit* target = (*itr)->getTarget(); if (target && target->GetTypeId() == TYPEID_PLAYER - && target->GetGUID() != me->EnsureVictim()->GetGUID() + && (!target->GetVictim() || target->GetGUID() != me->EnsureVictim()->GetGUID()) && target->GetPositionZ() > me->GetPositionZ() - 5 && !target->HasAura(AURA_SPECTRAL_EXHAUSTION)) { |
