diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-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 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; |