From 1236302388ae7b01e87a9413ced74a4d4855df1b Mon Sep 17 00:00:00 2001 From: Adam Scott Date: Tue, 11 Apr 2023 12:36:28 -0400 Subject: [PATCH] Add missing `script_type` `nullptr` check Co-authored-by: Fabio Alessandrelli --- modules/gdscript/gdscript_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index d1d50351d07..52180af5d0e 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4129,7 +4129,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()) {