Fix a potential crash when a Thread ends (resolves issue #1219).

This commit is contained in:
Alex Szpakowski
2016-10-08 10:50:50 -03:00
parent 304ccec71c
commit b1b4a637b5
6 changed files with 16 additions and 12 deletions
-3
View File
@@ -43,7 +43,6 @@ LuaThread::~LuaThread()
void LuaThread::threadFunction()
{
this->retain();
error.clear();
lua_State *L = luaL_newstate();
@@ -83,8 +82,6 @@ void LuaThread::threadFunction()
if (!error.empty())
onError();
this->release();
}
bool LuaThread::start(const std::vector<Variant> &args)