Browse Source

Fix editor crash when invalid global class script path

Hilderin 1 year ago
parent
commit
e18db6fe60
1 changed files with 3 additions and 0 deletions
  1. 3 0
      modules/gdscript/gdscript_analyzer.cpp

+ 3 - 0
modules/gdscript/gdscript_analyzer.cpp

@@ -5527,6 +5527,9 @@ bool GDScriptAnalyzer::check_type_compatibility(const GDScriptParser::DataType &
 				// A script type cannot be a subtype of a GDScript class.
 				return false;
 			}
+			if (p_source.script_type.is_null()) {
+				return false;
+			}
 			if (p_source.is_meta_type) {
 				src_native = p_source.script_type->get_class_name();
 			} else {