* Remove null reference exception in the J2KDecoderModule's J2K repair routine for when the asset we're looking up isn't an image at all. (did someone set the texture on the side of a primitive to some other kind of asset with the script engine?)
parent
9371df52cb
commit
bd7d00db33
|
@ -223,8 +223,20 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||||
// Try to do some heuristics error correction! Yeah.
|
// Try to do some heuristics error correction! Yeah.
|
||||||
bool sane2Heuristics = true;
|
bool sane2Heuristics = true;
|
||||||
|
|
||||||
|
|
||||||
|
if (texture.Image == null)
|
||||||
|
sane2Heuristics = false;
|
||||||
|
|
||||||
|
if (texture.LayerInfo == null)
|
||||||
|
sane2Heuristics = false;
|
||||||
|
|
||||||
|
if (sane2Heuristics)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
if (texture.LayerInfo.Length == 0)
|
if (texture.LayerInfo.Length == 0)
|
||||||
sane2Heuristics = false;
|
sane2Heuristics = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (sane2Heuristics)
|
if (sane2Heuristics)
|
||||||
{
|
{
|
||||||
|
@ -292,7 +304,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[J2KDecoderModule]: JPEG2000 texture decoding failed for {0}", AssetId);
|
m_log.WarnFormat("[J2KDecoderModule]: JPEG2000 texture decoding failed for {0}. Is this a texture? is it J2K?", AssetId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
texture = null; // dereference and dispose of ManagedImage
|
texture = null; // dereference and dispose of ManagedImage
|
||||||
|
|
Loading…
Reference in New Issue