diff --git a/src/modules/graphics/opengl/wrap_SpriteBatch.cpp b/src/modules/graphics/opengl/wrap_SpriteBatch.cpp index 470ba9947..513f367d6 100644 --- a/src/modules/graphics/opengl/wrap_SpriteBatch.cpp +++ b/src/modules/graphics/opengl/wrap_SpriteBatch.cpp @@ -112,7 +112,14 @@ int w_SpriteBatch_clear(lua_State *L) int w_SpriteBatch_bind(lua_State *L) { SpriteBatch *t = luax_checkspritebatch(L, 1); - t->lock(); + try + { + t->lock(); + } + catch (love::Exception &e) + { + return luaL_error(L, "%s", e.what()); + } return 0; }