From 2e288fade12aba07456550fb215a53ec4a630599 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 15 Dec 2008 18:11:47 +0000
Subject: * minor: Stop presence child status suffering an NRE if the agent
uuid given is not represent at all
---
OpenSim/Region/Environment/Scenes/Scene.cs | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 9497043..873662e 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -4130,15 +4130,14 @@ namespace OpenSim.Region.Environment.Scenes
return m_sceneGraph.GetScenePresence(avatarID);
}
- ///
- /// Request an Avatar's Child Status - used by ClientView when a 'kick everyone' or 'estate message' occurs
- ///
- /// AvatarID to lookup
- ///
public override bool PresenceChildStatus(UUID avatarID)
{
ScenePresence cp = GetScenePresence(avatarID);
- return cp.IsChildAgent;
+
+ if (cp != null)
+ return cp.IsChildAgent;
+
+ return false;
}
///
--
cgit v1.1