Fix a dangling lock issue in llRemoveInventory
parent
fb14390fb0
commit
48c52d6e48
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue