aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorMelanie2010-10-27 20:49:27 +0100
committerMelanie2010-10-27 20:49:27 +0100
commit05dbe4f2c4a58017ce6b59de45c2764f7ede4bd3 (patch)
tree22f6354b59a944d16aa9d0cab39fdb43ffb20667 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentMerge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/va... (diff)
parentPrevent nullrefs in scene object deletion. Mantis #5156 (diff)
downloadopensim-SC-05dbe4f2c4a58017ce6b59de45c2764f7ede4bd3.zip
opensim-SC-05dbe4f2c4a58017ce6b59de45c2764f7ede4bd3.tar.gz
opensim-SC-05dbe4f2c4a58017ce6b59de45c2764f7ede4bd3.tar.bz2
opensim-SC-05dbe4f2c4a58017ce6b59de45c2764f7ede4bd3.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index d4e3717..b016065 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -428,11 +428,14 @@ namespace OpenSim.Region.Framework.Scenes
428 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) 428 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked)
429 { 429 {
430 EntityBase entity; 430 EntityBase entity;
431 if (!Entities.TryGetValue(uuid, out entity) && entity is SceneObjectGroup) 431 if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup)))
432 return false; 432 return false;
433 433
434 SceneObjectGroup grp = (SceneObjectGroup)entity; 434 SceneObjectGroup grp = (SceneObjectGroup)entity;
435 435
436 if (entity == null)
437 return false;
438
436 if (!resultOfObjectLinked) 439 if (!resultOfObjectLinked)
437 { 440 {
438 m_numPrim -= grp.PrimCount; 441 m_numPrim -= grp.PrimCount;