aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 46e455765d3..67b1985c2dd 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -27160,9 +27160,10 @@ Difficulty Player::CheckLoadedLegacyRaidDifficultyID(Difficulty difficulty)
SpellInfo const* Player::GetCastSpellInfo(SpellInfo const* spellInfo) const
{
auto overrides = m_overrideSpells.find(spellInfo->Id);
- for (uint32 spellId : overrides->second)
- if (SpellInfo const* newInfo = sSpellMgr->GetSpellInfo(spellId))
- return Unit::GetCastSpellInfo(newInfo);
+ if (overrides != m_overrideSpells.end())
+ for (uint32 spellId : overrides->second)
+ if (SpellInfo const* newInfo = sSpellMgr->GetSpellInfo(spellId))
+ return Unit::GetCastSpellInfo(newInfo);
return Unit::GetCastSpellInfo(spellInfo);
}