diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 5 |
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; |