Prevent a nullref when nonphysical motion objects cross sim boundaries
parent
7c520cf531
commit
e74bf46007
|
@ -582,7 +582,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (ScenePresence av in m_linkedAvatars)
|
foreach (ScenePresence av in m_linkedAvatars)
|
||||||
{
|
{
|
||||||
SceneObjectPart p = m_scene.GetSceneObjectPart(av.ParentID);
|
SceneObjectPart p = m_scene.GetSceneObjectPart(av.ParentID);
|
||||||
if (m_parts.TryGetValue(p.UUID, out p))
|
if (p != null && m_parts.TryGetValue(p.UUID, out p))
|
||||||
{
|
{
|
||||||
Vector3 offset = p.GetWorldPosition() - av.ParentPosition;
|
Vector3 offset = p.GetWorldPosition() - av.ParentPosition;
|
||||||
av.AbsolutePosition += offset;
|
av.AbsolutePosition += offset;
|
||||||
|
|
Loading…
Reference in New Issue