소스 검색

Merge pull request #42936 from timothyqiu/error-return

3.2: Fixes crash after using enums in export variables
Rémi Verschelde 4 년 전
부모
커밋
da4f778410
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      modules/gdscript/gdscript_parser.cpp

+ 1 - 0
modules/gdscript/gdscript_parser.cpp

@@ -4630,6 +4630,7 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
 						if (subexpr->type != Node::TYPE_CONSTANT) {
 							current_export = PropertyInfo();
 							_set_error("Expected a constant expression.");
+							return;
 						}
 
 						Variant constant = static_cast<ConstantNode *>(subexpr)->value;