* minor: Stop presence child status suffering an NRE if the agent uuid given is not represent at all

This commit is contained in:
Justin Clarke Casey
2008-12-15 18:11:47 +00:00
parent 4b71b88114
commit 2e288fade1
2 changed files with 14 additions and 7 deletions

View File

@@ -4130,15 +4130,14 @@ namespace OpenSim.Region.Environment.Scenes
return m_sceneGraph.GetScenePresence(avatarID);
}
/// <summary>
/// Request an Avatar's Child Status - used by ClientView when a 'kick everyone' or 'estate message' occurs
/// </summary>
/// <param name="avatarID">AvatarID to lookup</param>
/// <returns></returns>
public override bool PresenceChildStatus(UUID avatarID)
{
ScenePresence cp = GetScenePresence(avatarID);
return cp.IsChildAgent;
if (cp != null)
return cp.IsChildAgent;
return false;
}
/// <summary>