diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 532598a..d48dc11 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1310,6 +1310,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
1310 | 1310 | ||
1311 | m_sceneGraph.Close(); | 1311 | m_sceneGraph.Close(); |
1312 | 1312 | ||
1313 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) | ||
1314 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name); | ||
1315 | |||
1316 | base.Close(); | ||
1317 | |||
1318 | // XEngine currently listens to the EventManager.OnShutdown event to trigger script stop and persistence. | ||
1319 | // Therefore. we must dispose of the PhysicsScene after this to prevent a window where script code can | ||
1320 | // attempt to reference a null or disposed physics scene. | ||
1313 | if (PhysicsScene != null) | 1321 | if (PhysicsScene != null) |
1314 | { | 1322 | { |
1315 | PhysicsScene phys = PhysicsScene; | 1323 | PhysicsScene phys = PhysicsScene; |
@@ -1318,12 +1326,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1318 | phys.Dispose(); | 1326 | phys.Dispose(); |
1319 | phys = null; | 1327 | phys = null; |
1320 | } | 1328 | } |
1321 | |||
1322 | if (!GridService.DeregisterRegion(RegionInfo.RegionID)) | ||
1323 | m_log.WarnFormat("[SCENE]: Deregister from grid failed for region {0}", Name); | ||
1324 | |||
1325 | // call the base class Close method. | ||
1326 | base.Close(); | ||
1327 | } | 1329 | } |
1328 | 1330 | ||
1329 | /// <summary> | 1331 | /// <summary> |