diff options
author | John Hurliman | 2009-11-05 13:10:58 -0800 |
---|---|---|
committer | John Hurliman | 2009-11-05 13:10:58 -0800 |
commit | afef1ac191d32e9c1514c294b17e404b1d4ae217 (patch) | |
tree | c390ef81c9c30922c2e95e32844832919884fd9c /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Applying #4332, optional packet statistics logging (diff) | |
download | opensim-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 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 5 |
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; |