Guard the scene list when estates are updated
parent
33aaa40bee
commit
543d1fe70b
|
@ -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,
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue