Use a copy of the inventory items list to register users in the thread started by GetFolderContent(), to protect ourselves against callers modifying lists
Hopefully this addresses http://opensimulator.org/mantis/view.php?id=5681remove-scene-viewer
parent
42790f021f
commit
655935db49
|
@ -188,8 +188,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
Util.FireAndForget(delegate
|
||||
{
|
||||
if (UserManager != null)
|
||||
foreach (InventoryItemBase item in invCol.Items)
|
||||
{
|
||||
// Protect ourselves against the caller subsequently modifying the items list
|
||||
foreach (InventoryItemBase item in new List<InventoryItemBase>(invCol.Items))
|
||||
UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
|
||||
}
|
||||
});
|
||||
|
||||
return invCol;
|
||||
|
|
|
@ -196,8 +196,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory
|
|||
Util.FireAndForget(delegate
|
||||
{
|
||||
if (UserManager != null)
|
||||
foreach (InventoryItemBase item in invCol.Items)
|
||||
{
|
||||
// Protect ourselves against the caller subsequently modifying the items list
|
||||
foreach (InventoryItemBase item in new List<InventoryItemBase>(invCol.Items))
|
||||
UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData);
|
||||
}
|
||||
});
|
||||
|
||||
return invCol;
|
||||
|
|
Loading…
Reference in New Issue