mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Catch possible exceptions thrown when locking a SpriteBatch twice
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user