chandlerprall/Physijs — pull request #79 by timoxley (2013-03-07 16:00:43+00:00)
Title: Avoid infinite loop if geometry has no vertices/triangles

If you try create a ConvexMesh of a geometry with no vertices, then ammojs gets into an infinite loop: `Uncaught RangeError: Maximum call stack size exceeded `.

Since ammo.js is an external script to the web worker this scenario is horrible to debug as no matter what you do you can't get the stack at the time of the RangeError, so you can't see what's causing the issue. Had to copy ammojs into the worker to get proper stack trace. Anyway, this should fix you up. Due to the horror of debugging, you may want to do other similar assertions around the place to double check that no funky data ends up in ammo.