Make llRequestAgentData shout an error instead of crashing the script when an invalid UUID is passed to it.

avinationmerge
Tom 2011-01-28 09:55:46 -08:00
parent d91ee131b9
commit ffbfc14689
1 changed files with 96 additions and 88 deletions

View File

@ -4309,7 +4309,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
UUID uuid = (UUID)id; UUID uuid;
if (UUID.TryParse(id, out uuid))
{
PresenceInfo pinfo = null; PresenceInfo pinfo = null;
UserAccount account; UserAccount account;
@ -4411,6 +4413,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
ScriptSleep(100); ScriptSleep(100);
return tid.ToString(); return tid.ToString();
} }
else
{
ShoutError("Invalid UUID passed to llRequestAgentData.");
}
return "";
}
public LSL_String llRequestInventoryData(string name) public LSL_String llRequestInventoryData(string name)
{ {