[7997] Fixed crash at recursive call remove same spell. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-13 09:42:08 -05:00
parent c050cdd675
commit 8a2098d108

View File

@@ -3191,6 +3191,11 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool update_action_bar_
for (uint32 i=reqMap.count(spell_id);i>0;i--,itr2++)
removeSpell(itr2->second,disabled);
// re-search, it can be corrupted in prev loop
itr = m_spells.find(spell_id);
if (itr == m_spells.end())
return; // already unleared
bool cur_active = itr->second->active;
bool cur_dependent = itr->second->dependent;