mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Error instead of crashing when a frequency of 0 is set on a MouseJoint. Resolves issue #1197.
--HG-- branch : minor
This commit is contained in:
@@ -70,7 +70,7 @@ int w_MouseJoint_setFrequency(lua_State *L)
|
||||
{
|
||||
MouseJoint *t = luax_checkmousejoint(L, 1);
|
||||
float arg1 = (float)luaL_checknumber(L, 2);
|
||||
t->setFrequency(arg1);
|
||||
luax_catchexcept(L, [&]() { t->setFrequency(arg1); });
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user