Merge pull request #66306 from Razoric480/raz/null-string

Prevent a crash in the LSP when a function's return datatype is not resolved
This commit is contained in:
Rémi Verschelde 2022-09-25 11:05:26 +02:00
commit 4e81b68ed2

View file

@ -4001,7 +4001,7 @@ String GDScriptParser::DataType::to_string() const {
if (is_meta_type) {
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()) {
return name;
}