Remove try/catch in LandManagmentModule.GetLandObject() - this is very old code and the caught exceptions can no longer occur.
parent
3c05d67094
commit
8225e3f40c
|
@ -864,8 +864,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
|
|
||||||
lock (m_landIDList)
|
lock (m_landIDList)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
int landID = m_landIDList[x / LandUnit, y / LandUnit];
|
int landID = m_landIDList[x / LandUnit, y / LandUnit];
|
||||||
if (landID == 0)
|
if (landID == 0)
|
||||||
|
@ -929,23 +927,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
ret = m_landList[landID];
|
ret = m_landList[landID];
|
||||||
}
|
}
|
||||||
catch (IndexOutOfRangeException)
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"{0} GetLandObject: Tried to retrieve land object from out of bounds co-ordinate ({1},{2}) in {3}. landListSize=({4},{5})",
|
|
||||||
LogHeader, x, y, m_scene.RegionInfo.RegionName, m_landIDList.GetLength(0), m_landIDList.GetLength(1));
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"{0} GetLandObject: LandID not in landlist. XY=<{1},{2}> in {3}. landID[x,y]={4}",
|
|
||||||
LogHeader, x, y, m_scene.RegionInfo.RegionName, m_landIDList[x/LandUnit, y/LandUnit]);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue