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/CoreModules/Scripting | |
parent | Applying #4332, optional packet statistics logging (diff) | |
download | opensim-SC-afef1ac191d32e9c1514c294b17e404b1d4ae217.zip opensim-SC-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.gz opensim-SC-afef1ac191d32e9c1514c294b17e404b1d4ae217.tar.bz2 opensim-SC-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/CoreModules/Scripting')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index 9a6c49a..43761fc 100644 --- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -311,11 +311,8 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture | |||
311 | } | 311 | } |
312 | 312 | ||
313 | // Create a new asset for user | 313 | // Create a new asset for user |
314 | AssetBase asset = new AssetBase(); | 314 | AssetBase asset = new AssetBase(UUID.Random(), "DynamicImage" + Util.RandomClass.Next(1, 10000), (sbyte)AssetType.Texture); |
315 | asset.FullID = UUID.Random(); | ||
316 | asset.Data = assetData; | 315 | asset.Data = assetData; |
317 | asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); | ||
318 | asset.Type = 0; | ||
319 | asset.Description = String.Format("URL image : {0}", Url); | 316 | asset.Description = String.Format("URL image : {0}", Url); |
320 | asset.Local = false; | 317 | asset.Local = false; |
321 | asset.Temporary = ((Disp & DISP_TEMP) != 0); | 318 | asset.Temporary = ((Disp & DISP_TEMP) != 0); |