From 06cb7a6db6941b744f64689055226d663e3c5ddf Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Mon, 9 Jan 2017 22:37:49 -0400 Subject: [PATCH] Error instead of crash when Source:setLooping is called on a queueable Source (thanks zorg) --HG-- branch : minor --- src/modules/audio/wrap_Source.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/audio/wrap_Source.cpp b/src/modules/audio/wrap_Source.cpp index a9f20ae4f..ff35faefc 100644 --- a/src/modules/audio/wrap_Source.cpp +++ b/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; }