Guard the scene list when estates are updated

user_profiles
Melanie 2013-05-08 21:14:52 +01:00
parent 33aaa40bee
commit 543d1fe70b
2 changed files with 14 additions and 9 deletions

View File

@ -136,15 +136,18 @@ namespace OpenSim.Region.CoreModules.World.Estate
// Handle local regions locally
//
foreach (Scene s in m_EstateModule.Scenes)
lock (m_EstateModule.Scenes)
{
if (regions.Contains(s.RegionInfo.RegionID))
foreach (Scene s in m_EstateModule.Scenes)
{
// All regions in one estate are in the same scope.
// Use that scope.
//
ScopeID = s.RegionInfo.ScopeID;
regions.Remove(s.RegionInfo.RegionID);
if (regions.Contains(s.RegionInfo.RegionID))
{
// All regions in one estate are in the same scope.
// Use that scope.
//
ScopeID = s.RegionInfo.ScopeID;
regions.Remove(s.RegionInfo.RegionID);
}
}
}

View File

@ -93,7 +93,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void AddRegion(Scene scene)
{
m_Scenes.Add(scene);
lock (m_Scenes)
m_Scenes.Add(scene);
scene.EventManager.OnNewClient += OnNewClient;
}
@ -111,7 +112,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
scene.EventManager.OnNewClient -= OnNewClient;
m_Scenes.Remove(scene);
lock (m_Scenes)
m_Scenes.Remove(scene);
}
public string Name