summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
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;
}