diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index dde54d5..ac27716 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -156,7 +156,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
156 | 156 | ||
157 | // OK so either the viewer didn't send a folderID or AddItem failed | 157 | // OK so either the viewer didn't send a folderID or AddItem failed |
158 | UUID originalFolder = item.Folder; | 158 | UUID originalFolder = item.Folder; |
159 | InventoryFolderBase f = InventoryService.GetFolderForType(item.Owner, (AssetType)item.AssetType); | 159 | InventoryFolderBase f = null; |
160 | if (Enum.IsDefined(typeof(FolderType), (sbyte)item.AssetType)) | ||
161 | f = InventoryService.GetFolderForType(item.Owner, (FolderType)item.AssetType); | ||
160 | if (f != null) | 162 | if (f != null) |
161 | { | 163 | { |
162 | m_log.DebugFormat( | 164 | m_log.DebugFormat( |
@@ -743,7 +745,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
743 | 745 | ||
744 | if (itemCopy.Folder == UUID.Zero) | 746 | if (itemCopy.Folder == UUID.Zero) |
745 | { | 747 | { |
746 | InventoryFolderBase folder = InventoryService.GetFolderForType(recipient, (AssetType)itemCopy.AssetType); | 748 | InventoryFolderBase folder = null; |
749 | if (Enum.IsDefined(typeof(FolderType), (sbyte)item.AssetType)) | ||
750 | folder = InventoryService.GetFolderForType(recipient, (FolderType)itemCopy.AssetType); | ||
747 | 751 | ||
748 | if (folder != null) | 752 | if (folder != null) |
749 | { | 753 | { |
@@ -1155,7 +1159,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1155 | if (item == null) | 1159 | if (item == null) |
1156 | return; | 1160 | return; |
1157 | 1161 | ||
1158 | InventoryFolderBase destFolder = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.TrashFolder); | 1162 | InventoryFolderBase destFolder = InventoryService.GetFolderForType(remoteClient.AgentId, FolderType.Trash); |
1159 | 1163 | ||
1160 | // Move the item to trash. If this is a copyable item, only | 1164 | // Move the item to trash. If this is a copyable item, only |
1161 | // a copy will be moved and we will still need to delete | 1165 | // a copy will be moved and we will still need to delete |