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

0.6.1-post-fixes
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

@ -72,7 +72,15 @@ namespace OpenSim.Framework
string GetSimulatorVersion();
bool PresenceChildStatus(UUID avatarID);
/// <summary>
/// Is the agent denoted by the given agentID a child presence in this scene?
/// </summary>
///
/// Used by ClientView when a 'kick everyone' or 'estate message' occurs
///
/// <param name="avatarID">AvatarID to lookup</param>
/// <returns>true if the presence is a child agent, false if the presence does not exist or is not a child agent</returns>
bool PresenceChildStatus(UUID agentId);
// Diva: get this out of here!!!
string GetCapsPath(UUID agentId);

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>