diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs index 5728731a24..be328a7b54 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs @@ -631,16 +631,29 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap private warp_Texture GetTexture(UUID id) { warp_Texture ret = null; + byte[] asset = m_scene.AssetService.GetData(id.ToString()); + if (asset != null) { IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface(); - Bitmap img = (Bitmap) imgDecoder.DecodeToImage(asset); + Bitmap img = null; + + try + { + img = (Bitmap)imgDecoder.DecodeToImage(asset); + } + catch (Exception e) + { + m_log.Warn(string.Format("[WARP 3D IMAGE MODULE]: Failed to decode asset {0}, exception ", id), e); + } + if (img != null) { return new warp_Texture(img); } } + return ret; }