Преглед изворни кода

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;
 			return class_type->fqcn;
 		case SCRIPT: {
 		case SCRIPT: {
 			if (is_meta_type) {
 			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() : "";
 			String name = script_type != nullptr ? script_type->get_name() : "";
 			if (!name.is_empty()) {
 			if (!name.is_empty()) {