From 75e4af9d3959b666b652013d2de4d5f4625f9fa2 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 8 Jun 2013 11:00:05 -0400 Subject: Catch exception triggered by incoming avatars using legacy profiles --- .../CoreModules/Avatar/UserProfiles/UserProfileModule.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs index 72e557c..322addd 100644 --- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs @@ -1317,7 +1317,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles Stream rstream = webResponse.GetResponseStream(); OSDMap response = new OSDMap(); - response = (OSDMap)OSDParser.DeserializeJson(rstream); + try + { + response = (OSDMap)OSDParser.DeserializeJson(rstream); + } + catch (Exception e) + { + m_log.DebugFormat("[PROFILES]: JsonRpcRequest Error {0} - remote user with legacy profiles?", e.Message); + return false; + } + if(response.ContainsKey("error")) { data = response["error"]; -- cgit v1.1