Jelajahi Sumber

Merge pull request #68717 from rune-scape/rune-compiler-regression

Fixes https://github.com/godotengine/godot/issues/68716
Yuri Rubinsky 2 tahun lalu
induk
melakukan
95a85c9058
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      modules/gdscript/gdscript_compiler.cpp

+ 1 - 0
modules/gdscript/gdscript_compiler.cpp

@@ -133,6 +133,7 @@ GDScriptDataType GDScriptCompiler::_gdtype_from_datatype(const GDScriptParser::D
 
 			if (script.is_null()) {
 				_set_error(vformat(R"(Could not find class "%s" in "%s".)", p_datatype.class_type->fqcn, p_datatype.script_path), nullptr);
+				return GDScriptDataType();
 			} else {
 				// Only hold a strong reference if the owner of the element qualified with this type is not local, to avoid cyclic references (leaks).
 				// TODO: Might lead to use after free if script_type is a subclass and is used after its parent is freed.