diff options
author | UbitUmarov | 2018-04-28 12:43:06 +0100 |
---|---|---|
committer | UbitUmarov | 2018-04-28 12:43:06 +0100 |
commit | 44fd5bb7b5f7cab111ffc3ddbc3182b451799fad (patch) | |
tree | 1199fca3990340d56b94fe6dee4ce78c648e560b /OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |
parent | mantis8309 add extra try{}catch (diff) | |
download | opensim-SC_OLD-44fd5bb7b5f7cab111ffc3ddbc3182b451799fad.zip opensim-SC_OLD-44fd5bb7b5f7cab111ffc3ddbc3182b451799fad.tar.gz opensim-SC_OLD-44fd5bb7b5f7cab111ffc3ddbc3182b451799fad.tar.bz2 opensim-SC_OLD-44fd5bb7b5f7cab111ffc3ddbc3182b451799fad.tar.xz |
mantis 8321: avoid null reference potencial caused by outdated LMs for example
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 95b1af9..b1f5122 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -2036,18 +2036,25 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2036 | { | 2036 | { |
2037 | UUID parcel = UUID.Zero; | 2037 | UUID parcel = UUID.Zero; |
2038 | UUID.TryParse(id, out parcel); | 2038 | UUID.TryParse(id, out parcel); |
2039 | |||
2039 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 2040 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
2040 | ExtendedLandData extLandData = new ExtendedLandData(); | 2041 | ExtendedLandData extLandData = new ExtendedLandData(); |
2041 | if(!Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, | 2042 | if(!Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, |
2042 | out extLandData.X, out extLandData.Y)) | 2043 | out extLandData.X, out extLandData.Y)) |
2043 | return null; | 2044 | return null; |
2044 | m_log.DebugFormat("[LAND MANAGEMENT MODULE]: Got parcelinfo request for regionHandle {0}, x/y {1}/{2}", | 2045 | m_log.DebugFormat("[LAND MANAGEMENT MODULE] : Got parcelinfo request for regionHandle {0}, x/y {1}/{2}", |
2045 | extLandData.RegionHandle, extLandData.X, extLandData.Y); | 2046 | extLandData.RegionHandle, extLandData.X, extLandData.Y); |
2046 | 2047 | ||
2047 | // for this region or for somewhere else? | 2048 | // for this region or for somewhere else? |
2048 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) | 2049 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) |
2049 | { | 2050 | { |
2050 | extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; | 2051 | ILandObject extLandObject = this.GetLandObject(extLandData.X, extLandData.Y); |
2052 | if(extLandObject == null) | ||
2053 | { | ||
2054 | m_log.DebugFormat("[LAND MANAGEMENT MODULE]: ParcelInfoRequest: a FakeParcelID points to outside the region"); | ||
2055 | return null; | ||
2056 | } | ||
2057 | extLandData.LandData = extLandObject.LandData; | ||
2051 | extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; | 2058 | extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; |
2052 | } | 2059 | } |
2053 | else | 2060 | else |