diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index 89e3ac5c23..a88e86db4f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -138,6 +138,13 @@ namespace OpenSim.Region.Framework.Scenes
public void Close()
{
+ lock (m_localScenes)
+ {
+ for (int i = 0; i < m_localScenes.Count; i++)
+ {
+ m_localScenes[i].Close();
+ }
+ }
}
public void Close(Scene cscene)
diff --git a/prebuild.xml b/prebuild.xml
index d99da2bf81..7fff2e04d3 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1488,6 +1488,7 @@
+