mirror of
https://github.com/opensim/opensim.git
synced 2026-08-14 17:55:39 +08:00
Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen
This commit is contained in:
@@ -627,11 +627,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <returns></returns>
|
||||
private AssetBase CreateAsset(string name, string description, sbyte assetType, byte[] data)
|
||||
{
|
||||
AssetBase asset = new AssetBase();
|
||||
asset.Name = name;
|
||||
AssetBase asset = new AssetBase(UUID.Random(), name, assetType);
|
||||
asset.Description = description;
|
||||
asset.Type = assetType;
|
||||
asset.FullID = UUID.Random();
|
||||
asset.Data = (data == null) ? new byte[1] : data;
|
||||
|
||||
return asset;
|
||||
|
||||
Reference in New Issue
Block a user