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:
commit
4e81b68ed2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue