diff options
author | UbitUmarov | 2018-04-28 12:45:32 +0100 |
---|---|---|
committer | UbitUmarov | 2018-04-28 12:45:32 +0100 |
commit | 26ecba48f059149fb592b68a299b901641a1282d (patch) | |
tree | b1219c74bdf6a03f0d01dde9cf652219258a794c /OpenSim/Region/CoreModules/World | |
parent | Added important comment missed from my previous commit (hash 8af2d99b). (diff) | |
parent | mantis 8321: avoid null reference potencial caused by outdated LMs for example (diff) | |
download | opensim-SC-26ecba48f059149fb592b68a299b901641a1282d.zip opensim-SC-26ecba48f059149fb592b68a299b901641a1282d.tar.gz opensim-SC-26ecba48f059149fb592b68a299b901641a1282d.tar.bz2 opensim-SC-26ecba48f059149fb592b68a299b901641a1282d.tar.xz |
Merge branch 'master' into httptests
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-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 c32de62..7ba4a48 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -2033,18 +2033,25 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
2033 | { | 2033 | { |
2034 | UUID parcel = UUID.Zero; | 2034 | UUID parcel = UUID.Zero; |
2035 | UUID.TryParse(id, out parcel); | 2035 | UUID.TryParse(id, out parcel); |
2036 | |||
2036 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 2037 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
2037 | ExtendedLandData extLandData = new ExtendedLandData(); | 2038 | ExtendedLandData extLandData = new ExtendedLandData(); |
2038 | if(!Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, | 2039 | if(!Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, |
2039 | out extLandData.X, out extLandData.Y)) | 2040 | out extLandData.X, out extLandData.Y)) |
2040 | return null; | 2041 | return null; |
2041 | m_log.DebugFormat("[LAND MANAGEMENT MODULE]: Got parcelinfo request for regionHandle {0}, x/y {1}/{2}", | 2042 | m_log.DebugFormat("[LAND MANAGEMENT MODULE] : Got parcelinfo request for regionHandle {0}, x/y {1}/{2}", |
2042 | extLandData.RegionHandle, extLandData.X, extLandData.Y); | 2043 | extLandData.RegionHandle, extLandData.X, extLandData.Y); |
2043 | 2044 | ||
2044 | // for this region or for somewhere else? | 2045 | // for this region or for somewhere else? |
2045 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) | 2046 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) |
2046 | { | 2047 | { |
2047 | extLandData.LandData = this.GetLandObject(extLandData.X, extLandData.Y).LandData; | 2048 | ILandObject extLandObject = this.GetLandObject(extLandData.X, extLandData.Y); |
2049 | if(extLandObject == null) | ||
2050 | { | ||
2051 | m_log.DebugFormat("[LAND MANAGEMENT MODULE]: ParcelInfoRequest: a FakeParcelID points to outside the region"); | ||
2052 | return null; | ||
2053 | } | ||
2054 | extLandData.LandData = extLandObject.LandData; | ||
2048 | extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; | 2055 | extLandData.RegionAccess = m_scene.RegionInfo.AccessLevel; |
2049 | } | 2056 | } |
2050 | else | 2057 | else |