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))
|
if (lua_pcall(m_State, 0, 1, 0))
|
||||||
{
|
{
|
||||||
LuaManager::ReportErrors(m_State);
|
LuaManager::ReportErrors(m_State);
|
||||||
|
lua_pop(m_State, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -181,9 +182,9 @@ bool LuaScript::RunFunctionWithReturn(const char* funcName, double& numValue, st
|
|||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
lua_pop(m_State, 2);
|
lua_pop(m_State, 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user