diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index c8062d75b0..1eb481e0a7 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs @@ -135,7 +135,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid public void PostInitialise() { - ((ISharedRegionModule)m_GridServiceConnector).PostInitialise(); + if (m_Enabled) + ((ISharedRegionModule)m_GridServiceConnector).PostInitialise(); } public void Close() @@ -157,8 +158,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid public void RemoveRegion(Scene scene) { - m_LocalScenes.Remove(scene.RegionInfo.RegionHandle); - ((ISharedRegionModule)m_GridServiceConnector).RemoveRegion(scene); + if (m_Enabled) + { + m_LocalScenes.Remove(scene.RegionInfo.RegionHandle); + ((ISharedRegionModule)m_GridServiceConnector).RemoveRegion(scene); + } } public void RegionLoaded(Scene scene)