aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-17 00:45:56 +0000
committerMelanie Thielker2008-11-17 00:45:56 +0000
commit0e7b6879d21265aee35e29e057a290f3ebae5fec (patch)
tree76b305dc2df76391a8447d8669a88fa6b54fb09c
parentFix child prims in attachments chatting from near 0,0,0 rather than (diff)
downloadopensim-SC-0e7b6879d21265aee35e29e057a290f3ebae5fec.zip
opensim-SC-0e7b6879d21265aee35e29e057a290f3ebae5fec.tar.gz
opensim-SC-0e7b6879d21265aee35e29e057a290f3ebae5fec.tar.bz2
opensim-SC-0e7b6879d21265aee35e29e057a290f3ebae5fec.tar.xz
Add some null checks
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs4
1 files 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
424 m_groupPosition.Y = PhysActor.Position.Y; 424 m_groupPosition.Y = PhysActor.Position.Y;
425 m_groupPosition.Z = PhysActor.Position.Z; 425 m_groupPosition.Z = PhysActor.Position.Z;
426 } 426 }
427 if (ParentGroup.RootPart.IsAttachment) 427 if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment)
428 { 428 {
429 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.RootPart.AttachedAvatar); 429 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.RootPart.AttachedAvatar);
430 if (sp != null) 430 if (sp != null)
@@ -743,7 +743,7 @@ if (m_shape != null) {
743 public Vector3 AbsolutePosition 743 public Vector3 AbsolutePosition
744 { 744 {
745 get { 745 get {
746 if (ParentGroup.RootPart.IsAttachment) 746 if (ParentGroup != null && ParentGroup.RootPart != null && ParentGroup.RootPart.IsAttachment)
747 return GroupPosition; 747 return GroupPosition;
748 748
749 return m_offsetPosition + m_groupPosition; } 749 return m_offsetPosition + m_groupPosition; }