Prevent null crash when datatype not resolved

This commit is contained in:
Francois Belair 2022-09-23 11:13:57 -04:00
parent f74491fdee
commit 03e41d21e0

View file

@ -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;
} }