From 1532dbca0ae54ee6427153d7beec95b8cb52e1e3 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 14 Jun 2010 00:12:39 +0200 Subject: Guard against a potential nullref --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim') 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 if (m_parentID == 0) { SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); - m_parentPosition = part.AbsolutePosition; + if (part != null) + m_parentPosition = part.AbsolutePosition; } return m_parentPosition + m_pos; -- cgit v1.1