diff options
author | mingchen | 2008-06-07 17:48:45 +0000 |
---|---|---|
committer | mingchen | 2008-06-07 17:48:45 +0000 |
commit | cde42cdbfd6744aca4468b0b09cccb4becaf200e (patch) | |
tree | 59ba5f0f1a206d74f1ab2724f6daeec0bf747ef5 | |
parent | Patch for mantis#1493: Several patches to xengine. Thanks Melanie! (diff) | |
download | opensim-SC_OLD-cde42cdbfd6744aca4468b0b09cccb4becaf200e.zip opensim-SC_OLD-cde42cdbfd6744aca4468b0b09cccb4becaf200e.tar.gz opensim-SC_OLD-cde42cdbfd6744aca4468b0b09cccb4becaf200e.tar.bz2 opensim-SC_OLD-cde42cdbfd6744aca4468b0b09cccb4becaf200e.tar.xz |
Potential Fix #1 for 0001392: Shift+Drag now causes an unhandled 'Object reference not set to an instance of object' exception
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 1 |
2 files changed, 9 insertions, 4 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(); |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 589d642..f04ce7f 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -234,7 +234,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
234 | { | 234 | { |
235 | if (Entities.ContainsKey(uuid)) | 235 | if (Entities.ContainsKey(uuid)) |
236 | { | 236 | { |
237 | Console.WriteLine("REMOVED " + ((SceneObjectGroup)Entities[uuid]).Children.Count + "!"); | ||
238 | if (!resultOfObjectLinked) | 237 | if (!resultOfObjectLinked) |
239 | { | 238 | { |
240 | m_numPrim -= ((SceneObjectGroup)Entities[uuid]).Children.Count; | 239 | m_numPrim -= ((SceneObjectGroup)Entities[uuid]).Children.Count; |