diff options
author | UbitUmarov | 2017-05-19 18:03:02 +0100 |
---|---|---|
committer | UbitUmarov | 2017-05-19 18:03:02 +0100 |
commit | 52dd6833260720ada5681df337bb549725dea6c5 (patch) | |
tree | d925666b0d79cde0b4b1fa3be7c2a1bca5c51518 | |
parent | fix land parcel group been lost on region upload (diff) | |
download | opensim-SC_OLD-52dd6833260720ada5681df337bb549725dea6c5.zip opensim-SC_OLD-52dd6833260720ada5681df337bb549725dea6c5.tar.gz opensim-SC_OLD-52dd6833260720ada5681df337bb549725dea6c5.tar.bz2 opensim-SC_OLD-52dd6833260720ada5681df337bb549725dea6c5.tar.xz |
fix a null ref on parcels join
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 057e204..a2c7c83 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -679,6 +679,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
679 | public void removeLandObject(int local_id) | 679 | public void removeLandObject(int local_id) |
680 | { | 680 | { |
681 | ILandObject land; | 681 | ILandObject land; |
682 | UUID landGlobalID = UUID.Zero; | ||
682 | lock (m_landList) | 683 | lock (m_landList) |
683 | { | 684 | { |
684 | for (int x = 0; x < m_landIDList.GetLength(0); x++) | 685 | for (int x = 0; x < m_landIDList.GetLength(0); x++) |
@@ -697,12 +698,18 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
697 | 698 | ||
698 | land = m_landList[local_id]; | 699 | land = m_landList[local_id]; |
699 | m_landList.Remove(local_id); | 700 | m_landList.Remove(local_id); |
700 | if(land.LandData != null) | 701 | if(land != null && land.LandData != null) |
701 | m_landUUIDList.Remove(land.LandData.GlobalID); | 702 | { |
702 | land.Clear(); | 703 | landGlobalID = land.LandData.GlobalID; |
704 | m_landUUIDList.Remove(landGlobalID); | ||
705 | } | ||
703 | } | 706 | } |
704 | 707 | ||
705 | m_scene.EventManager.TriggerLandObjectRemoved(land.LandData.GlobalID); | 708 | if(landGlobalID != UUID.Zero) |
709 | { | ||
710 | m_scene.EventManager.TriggerLandObjectRemoved(landGlobalID); | ||
711 | land.Clear(); | ||
712 | } | ||
706 | } | 713 | } |
707 | 714 | ||
708 | /// <summary> | 715 | /// <summary> |