* Properly guard against the possibility that CopyInventoryItem doesn't get an asset back from the cache
parent
b0c5ef0b68
commit
0eeb56c61d
|
@ -317,11 +317,22 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: preserve current permissions?
|
AssetBase asset
|
||||||
CreateNewInventoryItem(
|
= AssetCache.GetAsset(
|
||||||
remoteClient, newFolderID, callbackID,
|
item.assetID, (item.assetType == (int)AssetType.Texture ? true : false));
|
||||||
AssetCache.GetAsset(item.assetID, (item.assetType == (int)AssetType.Texture ? true : false)),
|
|
||||||
item.inventoryNextPermissions);
|
if (asset != null)
|
||||||
|
{
|
||||||
|
// TODO: preserve current permissions?
|
||||||
|
CreateNewInventoryItem(
|
||||||
|
remoteClient, newFolderID, callbackID, asset, item.inventoryNextPermissions);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[AGENT INVENTORY]: Could not copy item {0} since asset {1} could not be found",
|
||||||
|
item.inventoryName, item.assetID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private AssetBase CreateAsset(string name, string description, sbyte invType, sbyte assetType, byte[] data)
|
private AssetBase CreateAsset(string name, string description, sbyte invType, sbyte assetType, byte[] data)
|
||||||
|
|
Loading…
Reference in New Issue