Fix a possible nullref in BestAvatarResponsiveness policy

avinationmerge
Melanie Thielker 2010-08-14 13:59:36 +02:00
parent d00a954d35
commit a32b0ce0ae
1 changed files with 2 additions and 2 deletions

View File

@ -186,9 +186,9 @@ namespace OpenSim.Region.Framework.Scenes
return 0.0;
// Use group position for child prims
Vector3 entityPos = entity.AbsolutePosition;
Vector3 entityPos;
if (entity is SceneObjectPart)
entityPos = m_scene.GetGroupByPrim(entity.LocalId).AbsolutePosition;
entityPos = ((SceneObjectPart)entity).ParentGroup.AbsolutePosition;
else
entityPos = entity.AbsolutePosition;