From a4c59b1fd2dd1fbf73a43981a9c729cef1001176 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 3 Aug 2012 15:21:29 +0100 Subject: minor change avoiding a null reference --- OpenSim/Region/Framework/Scenes/Scene.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bf2db58..c260fb2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2966,10 +2966,12 @@ namespace OpenSim.Region.Framework.Scenes try { ScenePresence sp = GetScenePresence(agentID); - PresenceService.LogoutAgent(sp.ControllingClient.SessionId); - + if (sp != null) + { + PresenceService.LogoutAgent(sp.ControllingClient.SessionId); sp.ControllingClient.Close(); + } // BANG! SLASH! m_authenticateHandler.RemoveCircuit(agentID); -- cgit v1.1