Fixed World:getBodyList, World:getJointList, and World:getContactList causing hard crashes instead of Lua errors

This commit is contained in:
Alex Szpakowski
2014-02-10 14:01:59 -04:00
parent 0e28a9d01b
commit c17cada9e0
+9 -3
View File
@@ -143,21 +143,27 @@ int w_World_getBodyList(lua_State *L)
{
World *t = luax_checkworld(L, 1);
lua_remove(L, 1);
return t->getBodyList(L);
int ret = 0;
EXCEPT_GUARD(ret = t->getBodyList(L);)
return ret;
}
int w_World_getJointList(lua_State *L)
{
World *t = luax_checkworld(L, 1);
lua_remove(L, 1);
return t->getJointList(L);
int ret = 0;
EXCEPT_GUARD(ret = t->getJointList(L);)
return ret;
}
int w_World_getContactList(lua_State *L)
{
World *t = luax_checkworld(L, 1);
lua_remove(L, 1);
return t->getContactList(L);
int ret = 0;
EXCEPT_GUARD(ret = t->getContactList(L);)
return ret;
}
int w_World_queryBoundingBox(lua_State *L)