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

Add missing `script_type` `nullptr` check
This commit is contained in:
Rémi Verschelde 2023-05-22 13:48:32 +02:00
commit 06d337af80
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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()) {