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,6 +136,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
// Handle local regions locally // Handle local regions locally
// //
lock (m_EstateModule.Scenes)
{
foreach (Scene s in m_EstateModule.Scenes) foreach (Scene s in m_EstateModule.Scenes)
{ {
if (regions.Contains(s.RegionInfo.RegionID)) if (regions.Contains(s.RegionInfo.RegionID))
@ -147,6 +149,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
regions.Remove(s.RegionInfo.RegionID); regions.Remove(s.RegionInfo.RegionID);
} }
} }
}
// Our own region should always be in the above list. // Our own region should always be in the above list.
// In a standalone this would not be true. But then, // In a standalone this would not be true. But then,

View File

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