aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index 29e3143..1c04796 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -583,11 +583,17 @@ namespace OpenSim.Region.Environment.Modules.World.Land
583 public void UpdateLandPrimCounts() 583 public void UpdateLandPrimCounts()
584 { 584 {
585 ResetAllLandPrimCounts(); 585 ResetAllLandPrimCounts();
586 foreach (EntityBase obj in m_scene.Entities.Values) 586 lock (m_scene.Entities)
587 { 587 {
588 if (obj is SceneObjectGroup) 588 foreach (EntityBase obj in m_scene.Entities.Values)
589 { 589 {
590 m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj); 590 if (obj != null)
591 {
592 if (obj is SceneObjectGroup)
593 {
594 m_scene.EventManager.TriggerParcelPrimCountAdd((SceneObjectGroup)obj);
595 }
596 }
591 } 597 }
592 } 598 }
593 FinalizeLandPrimCountUpdate(); 599 FinalizeLandPrimCountUpdate();