Fix a dangling lock issue in llRemoveInventory

avinationmerge
meta7 2010-08-10 09:50:18 -07:00
parent fb14390fb0
commit 48c52d6e48
1 changed files with 15 additions and 11 deletions

View File

@ -4200,6 +4200,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
m_host.AddScriptLPS(1);
try
{
m_host.TaskInventory.LockItemsForRead(true);
foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
{
@ -4209,13 +4211,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
throw new ScriptDeleteException();
else
m_host.Inventory.RemoveInventoryItem(item.ItemID);
m_host.TaskInventory.LockItemsForRead(false);
return;
}
}
}
finally
{
m_host.TaskInventory.LockItemsForRead(false);
}
}
public void llSetText(string text, LSL_Vector color, double alpha)
{