forked from mirrors/0ad
Propagate error from autostart
The JavaScript error wasn't propagated leading to an infinite loop. Fixes: #7967
This commit is contained in:
@@ -855,7 +855,8 @@ bool Autostart(const CmdLineArgs& args)
|
||||
while (!shouldQuit)
|
||||
{
|
||||
g_NetClient->Poll();
|
||||
ScriptFunction::Call(rq, global, "onTick", shouldQuit);
|
||||
if (!ScriptFunction::Call(rq, global, "onTick", shouldQuit))
|
||||
return false;
|
||||
std::this_thread::sleep_for(std::chrono::microseconds(200));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user