mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
catch a possible Box2D exception in setMassData (fixes issue #342)
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
#include "wrap_Body.h"
|
#include "wrap_Body.h"
|
||||||
|
#include "wrap_Physics.h"
|
||||||
|
|
||||||
namespace love
|
namespace love
|
||||||
{
|
{
|
||||||
@@ -290,7 +291,7 @@ namespace box2d
|
|||||||
float y = (float)luaL_checknumber(L, 3);
|
float y = (float)luaL_checknumber(L, 3);
|
||||||
float m = (float)luaL_checknumber(L, 4);
|
float m = (float)luaL_checknumber(L, 4);
|
||||||
float i = (float)luaL_checknumber(L, 5);
|
float i = (float)luaL_checknumber(L, 5);
|
||||||
t->setMassData(x, y, m, i);
|
ASSERT_GUARD(t->setMassData(x, y, m, i);)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user