Merge pull request #106976 from Ivorforce/gdscript-tests-infinite-print

Fix infinite recursion on `GDScriptTests` if a script cannot be reloaded.
This commit is contained in:
Thaddeus Crews 2025-06-02 18:51:52 -05:00
commit 5c2b9cd631
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC

View file

@ -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 + "'");
}