From ff945867a3c986d7a226322d234c4002ee682263 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 7 Jan 2017 00:35:09 +0000 Subject: [PATCH] Squelch red ink for login cancel by the user during circuit setup --- .../Avatar/Attachments/AttachmentsModule.cs | 13 ++++++++++++- .../EntityTransfer/EntityTransferModule.cs | 12 ++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index f4a8a6b60e..8b8ac20c4d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -1118,7 +1118,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments SceneObjectGroup objatt; - UUID rezGroupID = sp.ControllingClient.ActiveGroupId; + UUID rezGroupID; + + // This will fail if the user aborts login. sp will exist + // but ControllintClient will be null. + try + { + rezGroupID = sp.ControllingClient.ActiveGroupId; + } + catch + { + return null; + } if (itemID != UUID.Zero) objatt = m_invAccessModule.RezObject(sp.ControllingClient, diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index d0e5d8668f..6dc982be3c 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -1999,8 +1999,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer IClientAPI spClient = sp.ControllingClient; - if (!seeds.ContainsKey(currentRegionHandler)) - seeds.Add(currentRegionHandler, spClient.RequestClientInfo().CapsPath); + // This will fail if the user aborts login + try + { + if (!seeds.ContainsKey(currentRegionHandler)) + seeds.Add(currentRegionHandler, spClient.RequestClientInfo().CapsPath); + } + catch + { + return; + } AgentCircuitData currentAgentCircuit = spScene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);