From 6ddf124c8af73d52132c3cc1047d01ac4cbcbadf Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 18 Aug 2010 20:17:20 +0200 Subject: Prevent a bad cast in llCreateLink(). --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b21e532..d38fe9f 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 -- cgit v1.1 From 85f448642b411b8fd39aee4283e9b484378336d0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 19 Aug 2010 00:54:09 +0100 Subject: minor: Correct string format in "Can't find linkset root prim" message --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9963225..4d84018 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2165,7 +2165,7 @@ namespace OpenSim.Region.Framework.Scenes if (root == null) { - m_log.DebugFormat("[LINK]: Can't find linkset root prim {0{", parentPrimId); + m_log.DebugFormat("[LINK]: Can't find linkset root prim {0}", parentPrimId); return; } -- cgit v1.1