aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authoropensim mirror account2010-10-27 13:40:10 -0700
committeropensim mirror account2010-10-27 13:40:10 -0700
commit0269ec6af0d98052a28ffe980f5e1812dad0f29e (patch)
treebd667928378153e68885858498ab94099e6e3706 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentMerge branch 'master' of /var/git/opensim/ (diff)
parentPrevent nullrefs in scene object deletion. Mantis #5156 (diff)
downloadopensim-SC-0269ec6af0d98052a28ffe980f5e1812dad0f29e.zip
opensim-SC-0269ec6af0d98052a28ffe980f5e1812dad0f29e.tar.gz
opensim-SC-0269ec6af0d98052a28ffe980f5e1812dad0f29e.tar.bz2
opensim-SC-0269ec6af0d98052a28ffe980f5e1812dad0f29e.tar.xz
Merge branch 'master' of /var/git/opensim/
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 f81c551..24d7334 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -406,11 +406,14 @@ namespace OpenSim.Region.Framework.Scenes
406 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked) 406 public bool DeleteSceneObject(UUID uuid, bool resultOfObjectLinked)
407 { 407 {
408 EntityBase entity; 408 EntityBase entity;
409 if (!Entities.TryGetValue(uuid, out entity) && entity is SceneObjectGroup) 409 if (!Entities.TryGetValue(uuid, out entity) || (!(entity is SceneObjectGroup)))
410 return false; 410 return false;
411 411
412 SceneObjectGroup grp = (SceneObjectGroup)entity; 412 SceneObjectGroup grp = (SceneObjectGroup)entity;
413 413
414 if (entity == null)
415 return false;
416
414 if (!resultOfObjectLinked) 417 if (!resultOfObjectLinked)
415 { 418 {
416 m_numPrim -= grp.PrimCount; 419 m_numPrim -= grp.PrimCount;