From 0e7b6879d21265aee35e29e057a290f3ebae5fec Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 17 Nov 2008 00:45:56 +0000 Subject: Add some null checks --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 06a7512..daf1b5e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -424,7 +424,7 @@ namespace OpenSim.Region.Environment.Scenes m_groupPosition.Y = PhysActor.Position.Y; m_groupPosition.Z = PhysActor.Position.Z; } - if (ParentGroup.RootPart.IsAttachment) + if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment) { ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.RootPart.AttachedAvatar); if (sp != null) @@ -743,7 +743,7 @@ if (m_shape != null) { public Vector3 AbsolutePosition { get { - if (ParentGroup.RootPart.IsAttachment) + if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment) return GroupPosition; return m_offsetPosition + m_groupPosition; } -- cgit v1.1