فهرست منبع

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;