mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Thread:start now clears the thread's error string before starting
This commit is contained in:
@@ -52,6 +52,7 @@ LuaThread::~LuaThread()
|
||||
void LuaThread::threadFunction()
|
||||
{
|
||||
this->retain();
|
||||
error.clear();
|
||||
lua_State *L = luaL_newstate();
|
||||
luaL_openlibs(L);
|
||||
#ifdef LOVE_BUILD_STANDALONE
|
||||
|
||||
@@ -58,7 +58,7 @@ int w_Thread_getError(lua_State *L)
|
||||
{
|
||||
LuaThread *t = luax_checkthread(L, 1);
|
||||
std::string err = t->getError();
|
||||
if (err.length() == 0)
|
||||
if (err.empty())
|
||||
lua_pushnil(L);
|
||||
else
|
||||
luax_pushstring(L, err);
|
||||
|
||||
Reference in New Issue
Block a user