aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2013-12-03 21:46:00 +0100
committerjackpoz <giacomopoz@gmail.com>2013-12-03 21:46:00 +0100
commit5bbded18b5a344c8990c1f8abbd4903359f278e7 (patch)
tree1618b49adabec85ab26f9953474fefe1958c65c4 /src/server/scripts/EasternKingdoms
parent0a9e58c2cc10161cfe9908f8087731e2732f8ba3 (diff)
Core/Misc: Fix some static analysis issues
Fix some static analysis issues about missing NULL checks. Pass safe Creature pointer instead of summoning a Creature, passing the GUID and retrieve the same Creature from GUID.
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
index 8efcbf29d30..91127f2db0d 100644
--- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
+++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp
@@ -614,7 +614,8 @@ public:
}
return 50000;
case 15:
- arca->DealDamage(arca, arca->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ if (arca)
+ arca->DealDamage(arca, arca->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
return 5000;
default : return 9999999;
}