diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 |
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 38f146f..2b8c4c1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10502,20 +10502,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10502 | { | 10502 | { |
10503 | m_host.AddScriptLPS(1); | 10503 | m_host.AddScriptLPS(1); |
10504 | 10504 | ||
10505 | TaskInventoryDictionary itemsDictionary = (TaskInventoryDictionary)m_host.TaskInventory.Clone(); | ||
10506 | |||
10507 | UUID assetID = UUID.Zero; | 10505 | UUID assetID = UUID.Zero; |
10508 | 10506 | ||
10509 | if (!UUID.TryParse(name, out assetID)) | 10507 | if (!UUID.TryParse(name, out assetID)) |
10510 | { | 10508 | { |
10511 | foreach (TaskInventoryItem item in itemsDictionary.Values) | 10509 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
10512 | { | 10510 | |
10513 | if (item.Type == 7 && item.Name == name) | 10511 | if (item != null && item.Type == 7) |
10514 | { | 10512 | assetID = item.AssetID; |
10515 | assetID = item.AssetID; | ||
10516 | break; | ||
10517 | } | ||
10518 | } | ||
10519 | } | 10513 | } |
10520 | 10514 | ||
10521 | if (assetID == UUID.Zero) | 10515 | if (assetID == UUID.Zero) |