From 03e41d21e00d580aaa8a3fc2a6136d7da177c6c6 Mon Sep 17 00:00:00 2001 From: Francois Belair Date: Fri, 23 Sep 2022 11:13:57 -0400 Subject: Prevent null crash when datatype not resolved --- modules/gdscript/gdscript_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdscript') diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index d8a06a8663..b4da94e448 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -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; } -- cgit v1.2.3