Skip to content

Commit

Permalink
Merge pull request #42936 from timothyqiu/error-return
Browse files Browse the repository at this point in the history
3.2: Fixes crash after using enums in export variables
  • Loading branch information
akien-mga authored Oct 20, 2020
2 parents eefb417 + 82900e5 commit da4f778
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit da4f778

Please sign in to comment.