From 11b48569c807be6019fb364187ef6ddae74b5ef6 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sat, 1 Feb 2014 19:23:20 +0100 Subject: [PATCH] Core/Spells: fix crash when loading custom spell attr with invalid spellid --- src/server/game/Spells/SpellMgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index eccb786346..93f264d2d6 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2731,7 +2731,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes() uint32 spellId = fields[0].GetUInt32(); uint32 attributes = fields[1].GetUInt32(); - spellInfo = mSpellInfoMap[spellId]; + spellInfo = _GetSpellInfo(spellId); if (!spellInfo) { TC_LOG_ERROR("sql.sql", "Table `spell_custom_attr` has wrong spell (entry: %u), ignored.", spellId);