Explorar o código

Merge pull request #75943 from adamscott/fix-missing-script-type-nullptr-check

Add missing `script_type` `nullptr` check
Rémi Verschelde %!s(int64=2) %!d(string=hai) anos
pai
achega
06d337af80
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/gdscript/gdscript_parser.cpp

+ 1 - 1
modules/gdscript/gdscript_parser.cpp

@@ -4192,7 +4192,7 @@ String GDScriptParser::DataType::to_string() const {
 			return class_type->fqcn;
 		case SCRIPT: {
 			if (is_meta_type) {
-				return script_type->get_class_name().operator String();
+				return script_type != nullptr ? script_type->get_class_name().operator String() : "";
 			}
 			String name = script_type != nullptr ? script_type->get_name() : "";
 			if (!name.is_empty()) {