From 14a5ccee5210d14171ccc0b4c33cb36beadea3e6 Mon Sep 17 00:00:00 2001 From: phosit Date: Thu, 11 Dec 2025 18:23:44 +0100 Subject: [PATCH] Propagate error from autostart The JavaScript error wasn't propagated leading to an infinite loop. Fixes: #7967 --- source/ps/GameSetup/GameSetup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/ps/GameSetup/GameSetup.cpp b/source/ps/GameSetup/GameSetup.cpp index 0cd5aef637..03d7c2a186 100644 --- a/source/ps/GameSetup/GameSetup.cpp +++ b/source/ps/GameSetup/GameSetup.cpp @@ -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)); } }