diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-16 13:17:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 13:17:53 +0100 |
commit | b910b22d74386f8d519e2b80a76d42e14d639584 (patch) | |
tree | 2eede4b33201bf777a1e48bd4c53add7a545a9f9 /modules/gdscript | |
parent | 789bad18f9ddb6972591ed261736eba303e1bdd4 (diff) | |
parent | 6661ceadcc75fd720f93b1c8c1aea3201591b4e5 (diff) |
Merge pull request #25001 from jlahman/gdscript-export-var-fix
Fixes export PackedScene "reset to default" throwing errors
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 160fc48f92..1292e11209 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4559,6 +4559,10 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { member.line = tokenizer->get_token_line(); member.usages = 0; member.rpc_mode = rpc_mode; +#ifdef TOOLS_ENABLED + Variant::CallError ce; + member.default_value = Variant::construct(member._export.type, NULL, 0, ce); +#endif if (current_class->constant_expressions.has(member.identifier)) { _set_error("A constant named '" + String(member.identifier) + "' already exists in this class (at line: " + |