Core/Misc: Fix some static analysis issues

Add some asserts and additional NULL checks as sanity checks.
This commit is contained in:
jackpoz committed 2014-03-21 22:47:58 +01:00
1 parent ada0598bb0
commit 9e99db035f
11 files changed
+47 -23

No files matched your search

+2
View File
@@ -941,6 +941,7 @@ public:
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
ASSERT(spellInfo);
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
}
@@ -971,6 +972,7 @@ public:
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
ASSERT(spellInfo);
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
}