From 7f7801ecb9cff8c31eee732c18f540afc67c6d38 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 20 Mar 2012 18:02:43 +0100 Subject: Cover the case where prims are loaded and ParentGroup is not yet set --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 9914c78..84b4bb3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1505,7 +1505,8 @@ namespace OpenSim.Region.Framework.Scenes } else m_physicsShapeType = DefaultPhysicsShapeType(); - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; } } @@ -1519,7 +1520,8 @@ namespace OpenSim.Region.Framework.Scenes m_density = value; ScheduleFullUpdateIfNone(); } - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; } } @@ -1530,7 +1532,8 @@ namespace OpenSim.Region.Framework.Scenes { if( value >= -1 && value <=28.0f) m_gravitymod = value; ScheduleFullUpdateIfNone(); - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; } } @@ -1544,7 +1547,8 @@ namespace OpenSim.Region.Framework.Scenes m_friction = value; ScheduleFullUpdateIfNone(); } - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; } } @@ -1558,7 +1562,8 @@ namespace OpenSim.Region.Framework.Scenes m_bounce = value; ScheduleFullUpdateIfNone(); } - ParentGroup.HasGroupChanged = true; + if (ParentGroup != null) + ParentGroup.HasGroupChanged = true; } } -- cgit v1.1