diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b21e53262e..d38fe9fec7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3505,6 +3505,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_host.AddScriptLPS(1); UUID invItemID = InventorySelf(); + UUID targetID; + + if (!UUID.TryParse(target, out targetID)) + return; TaskInventoryItem item; lock (m_host.TaskInventory) @@ -3524,7 +3528,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (sp != null) client = sp.ControllingClient; - SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)target); + SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID); if (targetPart.ParentGroup.RootPart.AttachmentPoint != 0) return; // Fail silently if attached