Jelajahi Sumber

Fix infinite recursion on `GDScriptTests` if a script cannot be reloaded.

Lukas Tenbrink 3 bulan lalu
induk
melakukan
a6664af0d6
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      modules/gdscript/tests/gdscript_test_runner.cpp

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