Skip to content

Commit 5c2b9cd

Browse files
committed
Merge pull request #106976 from Ivorforce/gdscript-tests-infinite-print
Fix infinite recursion on `GDScriptTests` if a script cannot be reloaded.
2 parents 937612a + a6664af commit 5c2b9cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/gdscript/tests/gdscript_test_runner.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
655655
result.status = GDTEST_LOAD_ERROR;
656656
result.output = "";
657657
result.passed = false;
658+
remove_print_handler(&_print_handler);
659+
remove_error_handler(&_error_handler);
658660
ERR_FAIL_V_MSG(result, "\nCould not reload script: '" + source_file + "'");
659661
}
660662

0 commit comments

Comments
 (0)