1
0
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:
phosit
2025-12-11 18:23:44 +01:00
parent f03be7b568
commit 14a5ccee52
+2 -1
View File
@@ -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));
}
}