aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-13 09:42:08 -0500
committermegamage <none@none>2009-06-13 09:42:08 -0500
commit8a2098d1089635a8dbf588fbf4e7232279660aca (patch)
treee9af7c7f2a97283ce9fcdae6a1e16975709a79f2 /src
parentc050cdd6753214c9688741c6940b1ba7c25994fb (diff)
[7997] Fixed crash at recursive call remove same spell. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp5
1 files changed, 5 insertions, 0 deletions
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;