From 8a2098d1089635a8dbf588fbf4e7232279660aca Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 13 Jun 2009 09:42:08 -0500 Subject: [7997] Fixed crash at recursive call remove same spell. Author: VladimirMangos --HG-- branch : trunk --- src/game/Player.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index cd0cb336f64..9e86cab3615 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -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; -- cgit v1.2.3