Browse Source

Prevent null crash when datatype not resolved

Francois Belair 2 years ago
parent
commit
03e41d21e0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/gdscript/gdscript_parser.cpp

+ 1 - 1
modules/gdscript/gdscript_parser.cpp

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