浏览代码

Add missing `script_type` `nullptr` check

Co-authored-by: Fabio Alessandrelli <[email protected]>
(cherry picked from commit 1236302388ae7b01e87a9413ced74a4d4855df1b)
Adam Scott 2 年之前
父节点
当前提交
09dc11bff5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      modules/gdscript/gdscript_parser.cpp

+ 1 - 1
modules/gdscript/gdscript_parser.cpp

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