Lock the iteration over the inventory items when saving script states

avinationmerge
Melanie 2010-09-28 02:22:32 +02:00
parent 841c84831f
commit 3d75e9addd
1 changed files with 2 additions and 0 deletions

View File

@ -1241,6 +1241,7 @@ namespace OpenSim.Region.Framework.Scenes
if (engines == null) // No engine at all if (engines == null) // No engine at all
return ret; return ret;
Items.LockItemsForRead(true);
foreach (TaskInventoryItem item in m_items.Values) foreach (TaskInventoryItem item in m_items.Values)
{ {
if (item.InvType == (int)InventoryType.LSL) if (item.InvType == (int)InventoryType.LSL)
@ -1268,6 +1269,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
} }
Items.LockItemsForRead(false);
return ret; return ret;
} }