From b481711fa65f6dadcff7ec10fcb83634079d8ab8 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 10 Jul 2014 16:00:06 +0300 Subject: Added locking in AccessModule to prevent possible errors when shutting down a simulator that has >1 region --- OpenSim/Region/CoreModules/World/Access/AccessModule.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs index 1599f15..f567cab 100644 --- a/OpenSim/Region/CoreModules/World/Access/AccessModule.cs +++ b/OpenSim/Region/CoreModules/World/Access/AccessModule.cs @@ -91,13 +91,17 @@ namespace OpenSim.Region.CoreModules.World public void AddRegion(Scene scene) { - if (!m_SceneList.Contains(scene)) - m_SceneList.Add(scene); + lock (m_SceneList) + { + if (!m_SceneList.Contains(scene)) + m_SceneList.Add(scene); + } } public void RemoveRegion(Scene scene) { - m_SceneList.Remove(scene); + lock (m_SceneList) + m_SceneList.Remove(scene); } public void RegionLoaded(Scene scene) -- cgit v1.1