aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-20 23:31:33 +0000
committerJustin Clarke Casey2008-02-20 23:31:33 +0000
commit0eeb56c61d0d6ae1b0291033920e27528d0e8167 (patch)
tree1c82642180456eb062d69f24e9dad845fd8947ac /OpenSim/Region
parent* Eliminate AssetCache.CopyAsset() (diff)
downloadopensim-SC_OLD-0eeb56c61d0d6ae1b0291033920e27528d0e8167.zip
opensim-SC_OLD-0eeb56c61d0d6ae1b0291033920e27528d0e8167.tar.gz
opensim-SC_OLD-0eeb56c61d0d6ae1b0291033920e27528d0e8167.tar.bz2
opensim-SC_OLD-0eeb56c61d0d6ae1b0291033920e27528d0e8167.tar.xz
* Properly guard against the possibility that CopyInventoryItem doesn't get an asset back from the cache
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs21
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index a759173..e41f180 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -316,12 +316,23 @@ namespace OpenSim.Region.Environment.Scenes
316 return; 316 return;
317 } 317 }
318 } 318 }
319
320 AssetBase asset
321 = AssetCache.GetAsset(
322 item.assetID, (item.assetType == (int)AssetType.Texture ? true : false));
319 323
320 // TODO: preserve current permissions? 324 if (asset != null)
321 CreateNewInventoryItem( 325 {
322 remoteClient, newFolderID, callbackID, 326 // TODO: preserve current permissions?
323 AssetCache.GetAsset(item.assetID, (item.assetType == (int)AssetType.Texture ? true : false)), 327 CreateNewInventoryItem(
324 item.inventoryNextPermissions); 328 remoteClient, newFolderID, callbackID, asset, item.inventoryNextPermissions);
329 }
330 else
331 {
332 m_log.ErrorFormat(
333 "[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found",
334 item.inventoryName, item.assetID);
335 }
325 } 336 }
326 337
327 private AssetBase CreateAsset(string name, string description, sbyte invType, sbyte assetType, byte[] data) 338 private AssetBase CreateAsset(string name, string description, sbyte invType, sbyte assetType, byte[] data)