minor change avoiding a null reference

avinationmerge
UbitUmarov 2012-08-03 15:21:29 +01:00
parent 879d1cefb8
commit a4c59b1fd2
1 changed files with 4 additions and 2 deletions

View File

@ -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);