Error instead of crash when Source:setLooping is called on a queueable Source (thanks zorg)

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-01-09 22:37:49 -04:00
parent 22c4d1ae79
commit 06cb7a6db6
+1 -1
View File
@@ -244,7 +244,7 @@ int w_Source_isRelative(lua_State *L)
int w_Source_setLooping(lua_State *L) int w_Source_setLooping(lua_State *L)
{ {
Source *t = luax_checksource(L, 1); Source *t = luax_checksource(L, 1);
t->setLooping(luax_toboolean(L, 2)); luax_catchexcept(L, [&](){ t->setLooping(luax_toboolean(L, 2)); });
return 0; return 0;
} }