Guard the scene list when estates are updated
parent
33aaa40bee
commit
543d1fe70b
|
@ -136,15 +136,18 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
// Handle local regions locally
|
// 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.
|
if (regions.Contains(s.RegionInfo.RegionID))
|
||||||
// Use that scope.
|
{
|
||||||
//
|
// All regions in one estate are in the same scope.
|
||||||
ScopeID = s.RegionInfo.ScopeID;
|
// Use that scope.
|
||||||
regions.Remove(s.RegionInfo.RegionID);
|
//
|
||||||
|
ScopeID = s.RegionInfo.ScopeID;
|
||||||
|
regions.Remove(s.RegionInfo.RegionID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
m_Scenes.Add(scene);
|
lock (m_Scenes)
|
||||||
|
m_Scenes.Add(scene);
|
||||||
|
|
||||||
scene.EventManager.OnNewClient += OnNewClient;
|
scene.EventManager.OnNewClient += OnNewClient;
|
||||||
}
|
}
|
||||||
|
@ -111,7 +112,8 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||||
{
|
{
|
||||||
scene.EventManager.OnNewClient -= OnNewClient;
|
scene.EventManager.OnNewClient -= OnNewClient;
|
||||||
|
|
||||||
m_Scenes.Remove(scene);
|
lock (m_Scenes)
|
||||||
|
m_Scenes.Remove(scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Name
|
public string Name
|
||||||
|
|
Loading…
Reference in New Issue