From afef1ac191d32e9c1514c294b17e404b1d4ae217 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 5 Nov 2009 13:10:58 -0800 Subject: Changing the AssetBase constructors to avoid initializing assets with an unknown asset type, and log an error if it ever does happen --- OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Scripting') diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs index 963cab5..8ea7ad3 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Graphics.cs @@ -49,11 +49,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public UUID SaveBitmap(Bitmap data, bool lossless, bool temporary) { - AssetBase asset = new AssetBase(); - asset.FullID = UUID.Random(); + AssetBase asset = new AssetBase(UUID.Random(), "MRMDynamicImage", (sbyte)AssetType.Texture); asset.Data = OpenJPEG.EncodeFromImage(data, lossless); - asset.Name = "MRMDynamicImage"; - asset.Type = 0; asset.Description = "MRM Image"; asset.Local = false; asset.Temporary = temporary; -- cgit v1.1