catch a possible Box2D exception in setMassData (fixes issue #342)

This commit is contained in:
Bill Meltsner
2012-02-04 16:55:09 -05:00
parent 86abc9323b
commit f00b5f03f2
+2 -1
View File
@@ -19,6 +19,7 @@
**/
#include "wrap_Body.h"
#include "wrap_Physics.h"
namespace love
{
@@ -290,7 +291,7 @@ namespace box2d
float y = (float)luaL_checknumber(L, 3);
float m = (float)luaL_checknumber(L, 4);
float i = (float)luaL_checknumber(L, 5);
t->setMassData(x, y, m, i);
ASSERT_GUARD(t->setMassData(x, y, m, i);)
return 0;
}