2
0
Эх сурвалжийг харах

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

--HG--
branch : minor
Alex Szpakowski 9 жил өмнө
parent
commit
06cb7a6db6

+ 1 - 1
src/modules/audio/wrap_Source.cpp

@@ -244,7 +244,7 @@ int w_Source_isRelative(lua_State *L)
 int w_Source_setLooping(lua_State *L)
 {
 	Source *t = luax_checksource(L, 1);
-	t->setLooping(luax_toboolean(L, 2));
+	luax_catchexcept(L, [&](){ t->setLooping(luax_toboolean(L, 2)); });
 	return 0;
 }