From 843be1e93dd13f5ffeb26fa7533204bb4fea5bb8 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 16 May 2008 18:40:16 +0000 Subject: some more wrapping of errors in user service on appearance for safety --- .../Region/Communications/OGS1/OGS1UserServices.cs | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Communications/OGS1/OGS1UserServices.cs') diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 8c47323..2c97fd7 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -89,20 +89,26 @@ namespace OpenSim.Region.Communications.OGS1 public AvatarAppearance ConvertXMLRPCDataToAvatarAppearance(Hashtable data) { - if (data.Contains("error_type")) + if (data != null) { - m_log.Warn("[GRID]: " + - "Error sent by user server when trying to get user appearance: (" + - data["error_type"] + - "): " + data["error_desc"]); - return null; + if (data.Contains("error_type")) + { + m_log.Warn("[GRID]: " + + "Error sent by user server when trying to get user appearance: (" + + data["error_type"] + + "): " + data["error_desc"]); + return new AvatarAppearance(); + } + else + { + return new AvatarAppearance(data); + } } else { - return new AvatarAppearance(data); + m_log.Error("[GRID]: The avatar appearance is null, something bad happenend"); + return new AvatarAppearance(); } - - return null; } public List ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID, Hashtable data) -- cgit v1.1