Core/Misc: Fix static analysis issues

Fix some static analysis issues reported by Coverity

(cherry picked from commit c8999449816d4fd4f72c7cdb3b1515e8e244ba5f)

Conflicts:
	src/server/game/Entities/Player/Player.cpp
	src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
This commit is contained in:
jackpoz authored and Nayd committed 2015-02-02 01:47:59 +00:00
1 parent 7b05b0cb81
commit 2ec6844666
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1808,7 +1808,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
return ERR_BATTLEGROUND_NONE; // ERR_GROUP_JOIN_BATTLEGROUND_TOO_MANY handled on client side
// get a player as reference, to compare other players' stats to (arena team id, queue id based on level, etc.)
Player* reference = GetFirstMember()->GetSource();
Player* reference = ASSERT_NOTNULL(GetFirstMember())->GetSource();
// no reference found, can't join this way
if (!reference)
return ERR_BATTLEGROUND_JOIN_FAILED;
@@ -1259,7 +1259,7 @@ class spell_putricide_mutated_plague : public SpellScriptLoader
return;
uint32 triggerSpell = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
SpellInfo const* spell = sSpellMgr->GetSpellInfo(triggerSpell);
SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(triggerSpell);
spell = sSpellMgr->GetSpellForDifficultyFromSpell(spell, caster);
int32 damage = spell->Effects[EFFECT_0].CalcValue(caster);