recover lost null check in last commit

0.9.1.0-post-fixes
UbitUmarov 2018-07-14 16:11:03 +01:00
parent 0731220a9d
commit 6b8fda098d
1 changed files with 8 additions and 2 deletions

View File

@ -973,7 +973,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
try
{
return m_landList[m_landIDList[x / 4, y / 4]];
return m_landList[m_landIDList[x / LandUnit, y / LandUnit]];
}
catch (IndexOutOfRangeException)
{
@ -2044,7 +2044,13 @@ namespace OpenSim.Region.CoreModules.World.Land
// for this region or for somewhere else?
if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
{
extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData;
ILandObject extLandObject = this.GetLandObject(extLandData.X, extLandData.Y);
if (extLandObject == null)
{
m_log.DebugFormat("[LAND MANAGEMENT MODULE]: ParcelInfoRequest: a FakeParcelID points to outside the region");
return null;
}
extLandData.LandData = extLandObject.LandData;
extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel;
}
else