Catch possible exceptions thrown when locking a SpriteBatch twice

This commit is contained in:
Bart van Strien
2012-11-18 18:48:37 +01:00
parent 54498ce378
commit 94516e2290
@@ -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;
}