aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-10-12 00:49:07 +0100
committerUbitUmarov2015-10-12 00:49:07 +0100
commit3d8384b6963e0c0c83991b4d9045095e554d890a (patch)
treec2d2a7ff67502951b6f1c8c02ac9f5768f4f2209 /OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
parentuse System.IO.Compression.DeflateStream for mesh decompression like master, s... (diff)
downloadopensim-SC-3d8384b6963e0c0c83991b4d9045095e554d890a.zip
opensim-SC-3d8384b6963e0c0c83991b4d9045095e554d890a.tar.gz
opensim-SC-3d8384b6963e0c0c83991b4d9045095e554d890a.tar.bz2
opensim-SC-3d8384b6963e0c0c83991b4d9045095e554d890a.tar.xz
detect a fully degenerated mesh and avoid using it and so crashing ubOde
Diffstat (limited to 'OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
index 84df369..596ce0f 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -337,7 +337,6 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
337 return null; 337 return null;
338 } 338 }
339 339
340 primShape.SculptData = Utils.EmptyBytes;
341 340
342 int numCoords = coords.Count; 341 int numCoords = coords.Count;
343 int numFaces = faces.Count; 342 int numFaces = faces.Count;
@@ -355,6 +354,14 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
355 coords.Clear(); 354 coords.Clear();
356 faces.Clear(); 355 faces.Clear();
357 356
357 if(mesh.numberVertices() < 3 || mesh.numberTriangles() < 1)
358 {
359 m_log.ErrorFormat("[MESH]: invalid degenerated mesh for prim " + primName + " ignored");
360 return null;
361 }
362
363 primShape.SculptData = Utils.EmptyBytes;
364
358 return mesh; 365 return mesh;
359 } 366 }
360 367