mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Script: Fixed Lua crash on refresh when Update() in the script has an error.
This commit is contained in:
parent
c925f77c11
commit
b23217d840
@ -165,6 +165,7 @@ bool LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, st
|
||||
if (lua_pcall(m_State, 0, 1, 0))
|
||||
{
|
||||
LuaManager::ReportErrors(m_State);
|
||||
lua_pop(m_State, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -181,10 +182,10 @@ bool LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, st
|
||||
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
||||
lua_pop(m_State, 2);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user