* Rather than crash the region simulator, declare the teleport a failure if the "success" mapping doesn't exist. (also; I hate LLSD.)

0.6.5-rc1
Adam Frisby 2009-05-10 21:35:07 +00:00
parent dd8c01d7a7
commit 54ab7d7ceb
1 changed files with 13 additions and 6 deletions

View File

@ -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;
}
}
}
}