diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 7275c15..d336eda 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -4982,7 +4982,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4982 | 4982 | ||
4983 | public LandData GetLandData(float x, float y) | 4983 | public LandData GetLandData(float x, float y) |
4984 | { | 4984 | { |
4985 | return LandChannel.GetLandObject(x, y).LandData; | 4985 | ILandObject parcel = LandChannel.GetLandObject(x, y); |
4986 | if (parcel == null) | ||
4987 | return null; | ||
4988 | return parcel.LandData; | ||
4986 | } | 4989 | } |
4987 | 4990 | ||
4988 | /// <summary> | 4991 | /// <summary> |
@@ -4998,7 +5001,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4998 | public LandData GetLandData(uint x, uint y) | 5001 | public LandData GetLandData(uint x, uint y) |
4999 | { | 5002 | { |
5000 | m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); | 5003 | m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); |
5001 | return LandChannel.GetLandObject((int)x, (int)y).LandData; | 5004 | ILandObject parcel = LandChannel.GetLandObject((int)x, (int)y); |
5005 | if (parcel == null) | ||
5006 | return null; | ||
5007 | return parcel.LandData; | ||
5002 | } | 5008 | } |
5003 | 5009 | ||
5004 | #endregion | 5010 | #endregion |