* Prevent an error from stopping startup when decoding the sculpt mesh j2k fails.

0.6.0-stable
Teravus Ovares 2008-05-22 02:40:19 +00:00
parent 61bba6375c
commit bdcfc2e322
1 changed files with 12 additions and 2 deletions

View File

@ -52,8 +52,18 @@ namespace OpenSim.Region.Physics.Meshing
{
if (_lod == 2f || _lod == 4f || _lod == 8f || _lod == 16f || _lod == 32f || _lod == 64f)
lod = (int)_lod;
idata = OpenJPEG.DecodeToImage(jpegData);
try
{
idata = OpenJPEG.DecodeToImage(jpegData);
//int i = 0;
//i = i / i;
}
catch (Exception)
{
System.Console.WriteLine("[PHYSICS]: Unable to generate a Sculpty physics proxy. Sculpty texture decode failed!");
return;
}
if (idata != null)
{
bBitmap = new Bitmap(idata);