aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 2b8c4c1..cf65abb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10558,20 +10558,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10558 { 10558 {
10559 m_host.AddScriptLPS(1); 10559 m_host.AddScriptLPS(1);
10560 10560
10561 TaskInventoryDictionary itemsDictionary = (TaskInventoryDictionary)m_host.TaskInventory.Clone();
10562
10563 UUID assetID = UUID.Zero; 10561 UUID assetID = UUID.Zero;
10564 10562
10565 if (!UUID.TryParse(name, out assetID)) 10563 if (!UUID.TryParse(name, out assetID))
10566 { 10564 {
10567 foreach (TaskInventoryItem item in itemsDictionary.Values) 10565 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
10568 { 10566
10569 if (item.Type == 7 && item.Name == name) 10567 if (item != null && item.Type == 7)
10570 { 10568 assetID = item.AssetID;
10571 assetID = item.AssetID;
10572 break;
10573 }
10574 }
10575 } 10569 }
10576 10570
10577 if (assetID == UUID.Zero) 10571 if (assetID == UUID.Zero)