If texture decode fails in Warp3D map maker, log uuid of asset that failed to decode along with exception
parent
d50d169441
commit
11b4f534c2
|
@ -631,16 +631,29 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
|
||||||
private warp_Texture GetTexture(UUID id)
|
private warp_Texture GetTexture(UUID id)
|
||||||
{
|
{
|
||||||
warp_Texture ret = null;
|
warp_Texture ret = null;
|
||||||
|
|
||||||
byte[] asset = m_scene.AssetService.GetData(id.ToString());
|
byte[] asset = m_scene.AssetService.GetData(id.ToString());
|
||||||
|
|
||||||
if (asset != null)
|
if (asset != null)
|
||||||
{
|
{
|
||||||
IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
|
IJ2KDecoder imgDecoder = m_scene.RequestModuleInterface<IJ2KDecoder>();
|
||||||
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)
|
if (img != null)
|
||||||
{
|
{
|
||||||
return new warp_Texture(img);
|
return new warp_Texture(img);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue