summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorFrancois Belair <razoric480@gmail.com>2022-09-23 11:13:57 -0400
committerFrancois Belair <razoric480@gmail.com>2022-09-23 11:13:57 -0400
commit03e41d21e00d580aaa8a3fc2a6136d7da177c6c6 (patch)
treea65b1821f8696e9d5fefd2c17044d22480796ffb /modules/gdscript
parentf74491fdee9bc2d68668137fbacd8f3a7e7e8df7 (diff)
Prevent null crash when datatype not resolved
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}