aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 70e3952..9c1d2b6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1847,7 +1847,11 @@ namespace OpenSim.Region.Framework.Scenes
1847 // Get terrain height for sub-region in a megaregion if necessary 1847 // Get terrain height for sub-region in a megaregion if necessary
1848 int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X); 1848 int X = (int)((m_scene.RegionInfo.RegionLocX * Constants.RegionSize) + pos.X);
1849 int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y); 1849 int Y = (int)((m_scene.RegionInfo.RegionLocY * Constants.RegionSize) + pos.Y);
1850 UUID target_regionID = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y).RegionID; 1850 GridRegion target_region = m_scene.GridService.GetRegionByPosition(m_scene.RegionInfo.ScopeID, X, Y);
1851 // If X and Y is NaN, target_region will be null
1852 if (target_region == null)
1853 return;
1854 UUID target_regionID = target_region.RegionID;
1851 Scene targetScene = m_scene; 1855 Scene targetScene = m_scene;
1852 1856
1853 if (!SceneManager.Instance.TryGetScene(target_regionID, out targetScene)) 1857 if (!SceneManager.Instance.TryGetScene(target_regionID, out targetScene))