diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index bf3f48c67..e8cdc90a1 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1143,8 +1143,12 @@ void BattleGroundMgr::DeleteAllBattleGrounds() // will also delete template bgs: for(uint32 i = BATTLEGROUND_TYPE_NONE; i < MAX_BATTLEGROUND_TYPE_ID; ++i) { - for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end(); ++itr) - delete itr->second; + for(BattleGroundSet::iterator itr = m_BattleGrounds[i].begin(); itr != m_BattleGrounds[i].end();) + { + BattleGround * bg = itr->second; + ++itr; // step from invalidate iterator pos in result element remove in ~BattleGround call + delete bg; + } } } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 6236a986f..81b969836 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11485" + #define REVISION_NR "11486" #endif // __REVISION_NR_H__