Fix a nullref that can hit Vivox voice

avinationmerge
Melanie Thielker 2014-09-10 02:43:51 +02:00
parent 724d174a77
commit 0caa59b286
1 changed files with 8 additions and 2 deletions

View File

@ -4982,7 +4982,10 @@ namespace OpenSim.Region.Framework.Scenes
public LandData GetLandData(float x, float y) 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;
} }
/// <summary> /// <summary>
@ -4998,7 +5001,10 @@ namespace OpenSim.Region.Framework.Scenes
public LandData GetLandData(uint x, uint y) public LandData GetLandData(uint x, uint y)
{ {
m_log.DebugFormat("[SCENE]: returning land for {0},{1}", x, 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 #endregion