ProjectSkyfire/SkyFireEMU_rebase — Issue #66: Crash fix
Author: ste1s
Created: 2012-01-10 15:31:44+00:00
State: open

src/server/game/Entities/Unit/Unit.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 9536f16..ab326c7 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -6937,10 +6937,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
// Judgement of Light
case 20185:
{
- // 2% of base mana
- basepoints0 = int32(victim->CountPctFromMaxHealth(2));
- victim->CastCustomSpell(victim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
- return true;
+ if (!victim)
+ return false;
+ // 2% of base mana
+ basepoints0 = int32(victim->CountPctFromMaxHealth(2));
+ victim->CastCustomSpell(victim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
+ return true;
}
// Judgement of Wisdom
case 20186: