diff options
-rw-r--r-- | editor/create_dialog.cpp | 1 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index a1bc7a9522..99a2a73a75 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -425,7 +425,6 @@ Object *CreateDialog::instance_selected() { if (n) { n->set_name(custom); } - obj = n; } else { obj = EditorNode::get_editor_data().instance_custom_type(selected->get_text(0), custom); } diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index ca452bf008..63da849723 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -4072,6 +4072,9 @@ void GDScriptParser::_parse_class(ClassNode *p_class) { while (true) { current_function = function; Node *arg = _parse_and_reduce_expression(p_class, _static); + if (!arg) { + return; + } current_function = nullptr; cparent->arguments.push_back(arg); |