aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs26
1 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 71d63bb..1486e2a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4200,21 +4200,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4200 { 4200 {
4201 m_host.AddScriptLPS(1); 4201 m_host.AddScriptLPS(1);
4202 4202
4203 m_host.TaskInventory.LockItemsForRead(true); 4203 try
4204 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
4205 { 4204 {
4206 if (item.Name == name) 4205 m_host.TaskInventory.LockItemsForRead(true);
4206 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
4207 { 4207 {
4208 if (item.ItemID == m_itemID) 4208 if (item.Name == name)
4209 throw new ScriptDeleteException(); 4209 {
4210 else 4210 if (item.ItemID == m_itemID)
4211 m_host.Inventory.RemoveInventoryItem(item.ItemID); 4211 throw new ScriptDeleteException();
4212 4212 else
4213 m_host.TaskInventory.LockItemsForRead(false); 4213 m_host.Inventory.RemoveInventoryItem(item.ItemID);
4214 return; 4214 return;
4215 }
4215 } 4216 }
4216 } 4217 }
4217 m_host.TaskInventory.LockItemsForRead(false); 4218 finally
4219 {
4220 m_host.TaskInventory.LockItemsForRead(false);
4221 }
4218 } 4222 }
4219 4223
4220 public void llSetText(string text, LSL_Vector color, double alpha) 4224 public void llSetText(string text, LSL_Vector color, double alpha)