Merge pull request #40116 from ThakeeNathees/editor-crash-on-super-constructor

Fix: editor crash on super constructor called
This commit is contained in:
Rémi Verschelde 2020-07-06 16:45:37 +02:00 committed by GitHub
commit 80582d1f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -4072,6 +4072,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
while (true) { while (true) {
current_function = function; current_function = function;
Node *arg = _parse_and_reduce_expression(p_class, _static); Node *arg = _parse_and_reduce_expression(p_class, _static);
if (!arg) {
return;
}
current_function = nullptr; current_function = nullptr;
cparent->arguments.push_back(arg); cparent->arguments.push_back(arg);