From a6664af0d632120a643dc97fd0342c1f80c6b2c5 Mon Sep 17 00:00:00 2001 From: Lukas Tenbrink Date: Fri, 30 May 2025 21:33:35 +0200 Subject: [PATCH] Fix infinite recursion on `GDScriptTests` if a script cannot be reloaded. --- modules/gdscript/tests/gdscript_test_runner.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp index 59585b9a06..045aa308d0 100644 --- a/modules/gdscript/tests/gdscript_test_runner.cpp +++ b/modules/gdscript/tests/gdscript_test_runner.cpp @@ -655,6 +655,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) { result.status = GDTEST_LOAD_ERROR; result.output = ""; result.passed = false; + remove_print_handler(&_print_handler); + remove_error_handler(&_error_handler); ERR_FAIL_V_MSG(result, "\nCould not reload script: '" + source_file + "'"); }