diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index b96f38cf368..c997ca253ff 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4039,6 +4039,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { current_function = function; Node *arg = _parse_and_reduce_expression(p_class, _static); + if (!arg) { + return; + } current_function = NULL; cparent->arguments.push_back(arg);