summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2021-04-14 10:00:57 -0300
committerGitHub <noreply@github.com>2021-04-14 10:00:57 -0300
commit8fc4a732dee8b31130ad836de2847e909fb03871 (patch)
treeffb175eb728dab65255f67e46db6db39e22346ab
parent3d1d3ab3db7c1a3635d66792242ab8545c26984f (diff)
parent79a16b8a446a8bda35947da50e712de6c2ecb9a3 (diff)
Merge pull request #47330 from Blackiris/fix-corrupt-scene-when-export-has-setter
Fix corrupt scene when export var has setter
-rw-r--r--modules/gdscript/gdscript_parser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index 695154e9a9..ca8bb8fcae 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -811,6 +811,7 @@ GDScriptParser::VariableNode *GDScriptParser::parse_variable(bool p_allow_proper
VariableNode *variable = alloc_node<VariableNode>();
variable->identifier = parse_identifier();
+ variable->export_info.name = variable->identifier->name;
if (match(GDScriptTokenizer::Token::COLON)) {
if (check(GDScriptTokenizer::Token::NEWLINE)) {
@@ -860,8 +861,6 @@ GDScriptParser::VariableNode *GDScriptParser::parse_variable(bool p_allow_proper
end_statement("variable declaration");
- variable->export_info.name = variable->identifier->name;
-
return variable;
}