mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7997] Fixed crash at recursive call remove same spell.
This commit is contained in:
parent
d2d5990956
commit
fd1f47c88c
2 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue