Guard against a potential nullref

avinationmerge
Melanie Thielker 2010-06-14 00:12:39 +02:00
parent f9b4f5f594
commit 1532dbca0a
1 changed files with 2 additions and 1 deletions

View File

@ -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;