Browse Source

Fix: editor crash on super constructor called

Fix: #39909
Thakee Nathees 5 years ago
parent
commit
023b3f2786
1 changed files with 3 additions and 0 deletions
  1. 3 0
      modules/gdscript/gdscript_parser.cpp

+ 3 - 0
modules/gdscript/gdscript_parser.cpp

@@ -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);