From bdcfc2e3229f8f3370ab81a624c1a8b71e00d8a5 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 22 May 2008 02:40:19 +0000 Subject: * Prevent an error from stopping startup when decoding the sculpt mesh j2k fails. --- OpenSim/Region/Physics/Meshing/SculptMesh.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs index 1c4db15..28a4473 100644 --- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs +++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs @@ -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); -- cgit v1.1