mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
Fix a nullref that can hit Vivox voice
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user