mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fixed undefined behaviour when love exceptions are converted into Lua errors (resolves issue #729)
This commit is contained in:
@@ -91,14 +91,7 @@ extern "C" int luaopen_love_thread(lua_State *L)
|
||||
{
|
||||
if (instance == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
instance = new love::thread::ThreadModule();
|
||||
}
|
||||
catch (Exception & e)
|
||||
{
|
||||
return luaL_error(L, "%s", e.what());
|
||||
}
|
||||
EXCEPT_GUARD(instance = new love::thread::ThreadModule();)
|
||||
}
|
||||
else
|
||||
instance->retain();
|
||||
|
||||
Reference in New Issue
Block a user