aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-11-05 13:10:58 -0800
committerJohn Hurliman2009-11-05 13:10:58 -0800
commitafef1ac191d32e9c1514c294b17e404b1d4ae217 (patch)
treec390ef81c9c30922c2e95e32844832919884fd9c /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
parentApplying #4332, optional packet statistics logging (diff)
downloadopensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.zip
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.gz
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.bz2
opensim-SC_OLD-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.xz
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs5
1 files changed, 1 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 00743fc..6b2c7d3 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -627,11 +627,8 @@ namespace OpenSim.Region.Framework.Scenes
627 /// <returns></returns> 627 /// <returns></returns>
628 private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data) 628 private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data)
629 { 629 {
630 AssetBase asset = new AssetBase(); 630 AssetBase asset = new AssetBase(UUID.Random(), name, assetType);
631 asset.Name = name;
632 asset.Description = description; 631 asset.Description = description;
633 asset.Type = assetType;
634 asset.FullID = UUID.Random();
635 asset.Data = (data == null) ? new byte[1] : data; 632 asset.Data = (data == null) ? new byte[1] : data;
636 633
637 return asset; 634 return asset;