浏览代码

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;