Browse Source

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

--HG--
branch : minor
Alex Szpakowski 8 years ago
parent
commit
06cb7a6db6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/audio/wrap_Source.cpp

+ 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)
 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;
 }
 }