浏览代码

Fix: editor crash on super constructor called

Fix: #39909
(cherry picked from commit 023b3f2786a87342e6d3893c12a04ab589f6c79a)
Thakee Nathees 5 年之前
父节点
当前提交
9ce1fe59ea
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      modules/gdscript/gdscript_parser.cpp

+ 3 - 0
modules/gdscript/gdscript_parser.cpp

@@ -4039,6 +4039,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
 
 
 									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 = NULL;
 									current_function = NULL;
 									cparent->arguments.push_back(arg);
 									cparent->arguments.push_back(arg);