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

This commit is contained in:
VladimirMangos 2009-06-12 01:31:57 +04:00
parent d2d5990956
commit fd1f47c88c
2 changed files with 6 additions and 1 deletions

View file

@ -3080,6 +3080,11 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool update_action_bar_
if(HasSpell(itr2->second) && !GetTalentSpellPos(itr2->second))
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;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7996"
#define REVISION_NR "7997"
#endif // __REVISION_NR_H__