*Don't increment an iterator after it's erased, by RammboNr5. Also remove an unused iterator.
--HG-- branch : trunk
This commit is contained in:
+2
-2
@@ -21964,7 +21964,7 @@ void Player::_SaveTalents()
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_TALENT_SPECS; ++i)
|
||||
{
|
||||
for (PlayerTalentMap::iterator itr = m_talents[i]->begin(), next = m_talents[i]->begin(); itr != m_talents[i]->end(); )
|
||||
for (PlayerTalentMap::iterator itr = m_talents[i]->begin(); itr != m_talents[i]->end(); )
|
||||
{
|
||||
if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->state == PLAYERSPELL_CHANGED)
|
||||
CharacterDatabase.PExecute("DELETE FROM character_talent WHERE guid = '%u' and spell = '%u' and spec = '%u'", GetGUIDLow(), itr->first, itr->second->spec);
|
||||
@@ -21975,7 +21975,7 @@ void Player::_SaveTalents()
|
||||
if (itr->second->state == PLAYERSPELL_REMOVED)
|
||||
{
|
||||
delete itr->second;
|
||||
m_talents[i]->erase(itr++);
|
||||
m_talents[i]->erase(itr);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user