From 0caa59b286dd9716da821fb32c23c8d63ff53729 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 10 Sep 2014 02:43:51 +0200 Subject: Fix a nullref that can hit Vivox voice --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') 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 public LandData GetLandData(float x, float y) { - return LandChannel.GetLandObject(x, y).LandData; + ILandObject parcel = LandChannel.GetLandObject(x, y); + if (parcel == null) + return null; + return parcel.LandData; } /// @@ -4998,7 +5001,10 @@ namespace OpenSim.Region.Framework.Scenes public LandData GetLandData(uint x, uint y) { m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, y); - return LandChannel.GetLandObject((int)x, (int)y).LandData; + ILandObject parcel = LandChannel.GetLandObject((int)x, (int)y); + if (parcel == null) + return null; + return parcel.LandData; } #endregion -- cgit v1.1