From 54ab7d7ceb38858346958ad22e07076365966970 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 10 May 2009 21:35:07 +0000 Subject: * Rather than crash the region simulator, declare the teleport a failure if the "success" mapping doesn't exist. (also; I hate LLSD.) --- .../Framework/Communications/Clients/RegionClient.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Clients/RegionClient.cs b/OpenSim/Framework/Communications/Clients/RegionClient.cs index 6fdacb1..bd71357 100644 --- a/OpenSim/Framework/Communications/Clients/RegionClient.cs +++ b/OpenSim/Framework/Communications/Clients/RegionClient.cs @@ -124,12 +124,19 @@ namespace OpenSim.Framework.Communications.Clients if (!String.IsNullOrEmpty(response)) { - // we assume we got an OSDMap back - OSDMap r = GetOSDMap(response); - bool success = r["success"].AsBoolean(); - reason = r["reason"].AsString(); - - return success; + try + { + // we assume we got an OSDMap back + OSDMap r = GetOSDMap(response); + bool success = r["success"].AsBoolean(); + reason = r["reason"].AsString(); + return success; + } + catch (NullReferenceException e) + { + m_log.InfoFormat("[REST COMMS]: exception on reply of DoCreateChildAgentCall {0}", e.Message); + return false; + } } } } -- cgit v1.1