Sfoglia il codice sorgente

Add missing `script_type` `nullptr` check

Co-authored-by: Fabio Alessandrelli <[email protected]>
Adam Scott 2 anni fa
parent
commit
1236302388
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      modules/gdscript/gdscript_parser.cpp

+ 1 - 1
modules/gdscript/gdscript_parser.cpp

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