From f43e077150d39b454bd66d43a72736a75614a721 Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 1 Apr 2008 13:09:29 +0000 Subject: a few small changes --- OpenSim/Region/Environment/Scenes/Scene.cs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2fa0459..7ee0478 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -986,15 +986,18 @@ namespace OpenSim.Region.Environment.Scenes if (terrain != null) { byte[] data = terrain.WriteJpegImage("defaultstripe.png"); - m_regInfo.EstateSettings.terrainImageID = LLUUID.Random(); - AssetBase asset = new AssetBase(); - asset.FullID = m_regInfo.EstateSettings.terrainImageID; - asset.Data = data; - asset.Name = "terrainImage"; - asset.Description = RegionInfo.RegionName; - asset.Type = 0; - asset.Temporary = temporary; - AssetCache.AddAsset(asset); + if (data != null) + { + m_regInfo.EstateSettings.terrainImageID = LLUUID.Random(); + AssetBase asset = new AssetBase(); + asset.FullID = m_regInfo.EstateSettings.terrainImageID; + asset.Data = data; + asset.Name = "terrainImage"; + asset.Description = RegionInfo.RegionName; + asset.Type = 0; + asset.Temporary = temporary; + AssetCache.AddAsset(asset); + } } } -- cgit v1.1