From e7d9fe966cf501d77370fa45639e40ac2f3f6ab7 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 20 Oct 2018 14:00:13 +0100 Subject: [PATCH] fix groups v2 agentUUI ofr uuid.zero case --- .../GroupsServiceHGConnectorModule.cs | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs index 98525812e4..a1093c9b53 100644 --- a/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs +++ b/OpenSim/Addons/Groups/Hypergrid/GroupsServiceHGConnectorModule.cs @@ -605,14 +605,8 @@ namespace OpenSim.Groups private string AgentUUI(string AgentIDStr) { UUID AgentID = UUID.Zero; - try - { - AgentID = new UUID(AgentIDStr); - } - catch (FormatException) - { - return AgentID.ToString(); - } + if (!UUID.TryParse(AgentIDStr, out AgentID) || AgentID == UUID.Zero) + return UUID.Zero.ToString(); if (m_UserManagement.IsLocalGridUser(AgentID)) return AgentID.ToString(); @@ -636,14 +630,8 @@ namespace OpenSim.Groups private string AgentUUIForOutside(string AgentIDStr) { UUID AgentID = UUID.Zero; - try - { - AgentID = new UUID(AgentIDStr); - } - catch (FormatException) - { - return AgentID.ToString(); - } + if (!UUID.TryParse(AgentIDStr, out AgentID) || AgentID == UUID.Zero) + return UUID.Zero.ToString(); AgentCircuitData agent = null; foreach (Scene scene in m_Scenes)