diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index f5b9825..81477e7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -176,16 +176,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
176 | /// <param name="ownerId"></param> | 176 | /// <param name="ownerId"></param> |
177 | public void ChangeInventoryOwner(UUID ownerId) | 177 | public void ChangeInventoryOwner(UUID ownerId) |
178 | { | 178 | { |
179 | m_items.LockItemsForWrite(true); | 179 | List<TaskInventoryItem> items = GetInventoryItems(); |
180 | if (0 == Items.Count) | 180 | |
181 | { | 181 | if (items.Count == 0) |
182 | m_items.LockItemsForWrite(false); | ||
183 | return; | 182 | return; |
184 | } | ||
185 | 183 | ||
184 | m_items.LockItemsForWrite(true); | ||
186 | HasInventoryChanged = true; | 185 | HasInventoryChanged = true; |
187 | m_part.ParentGroup.HasGroupChanged = true; | 186 | m_part.ParentGroup.HasGroupChanged = true; |
188 | List<TaskInventoryItem> items = GetInventoryItems(); | ||
189 | foreach (TaskInventoryItem item in items) | 187 | foreach (TaskInventoryItem item in items) |
190 | { | 188 | { |
191 | if (ownerId != item.OwnerID) | 189 | if (ownerId != item.OwnerID) |
@@ -766,8 +764,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
766 | { | 764 | { |
767 | if (item.Name == name) | 765 | if (item.Name == name) |
768 | { | 766 | { |
769 | return item; | ||
770 | m_items.LockItemsForRead(false); | 767 | m_items.LockItemsForRead(false); |
768 | return item; | ||
771 | } | 769 | } |
772 | } | 770 | } |
773 | m_items.LockItemsForRead(false); | 771 | m_items.LockItemsForRead(false); |