diff --git a/src/game/OutdoorPvP.cpp b/src/game/OutdoorPvP.cpp index f2310aa4e0c..06d56897f1e 100644 --- a/src/game/OutdoorPvP.cpp +++ b/src/game/OutdoorPvP.cpp @@ -446,8 +446,11 @@ void OutdoorPvPObjective::UpdateActivePlayerProximityCheck() { for(int team = 0; team < 2; ++team) { - for(std::set::iterator itr = m_ActivePlayerGuids[team].begin(); itr != m_ActivePlayerGuids[team].end(); ++ itr) + std::set::iterator itr, next; + for(itr = m_ActivePlayerGuids[team].begin(); itr != m_ActivePlayerGuids[team].end(); itr = next) { + next = itr; + ++next; // if the player is online if(Player * pl = objmgr.GetPlayer(*itr)) {