diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7a7816a..9c507c2 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -470,7 +470,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
470 | if (m_parentID == 0) | 470 | if (m_parentID == 0) |
471 | { | 471 | { |
472 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); | 472 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); |
473 | m_parentPosition = part.AbsolutePosition; | 473 | if (part != null) |
474 | m_parentPosition = part.AbsolutePosition; | ||
474 | } | 475 | } |
475 | 476 | ||
476 | return m_parentPosition + m_pos; | 477 | return m_parentPosition + m_pos; |