Make llRequestAgentData shout an error instead of crashing the script when an invalid UUID is passed to it.
parent
d91ee131b9
commit
ffbfc14689
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue