diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 4976891e2b0..b95e52f7b5e 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -542,7 +542,7 @@ Error VariantParser::parse_value(Token& token,Variant &value,Stream *p_stream,in value=true; else if (id=="false") value=false; - else if (id=="null") + else if (id=="null" || id=="nil") value=Variant(); else if (id=="Vector2"){ diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 71a0f502401..c319e306e08 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -1597,7 +1597,9 @@ bool Control::has_focus() const { void Control::grab_focus() { - ERR_FAIL_COND(!is_inside_tree()); + if (!is_inside_tree()){ + ERR_FAIL_COND(!is_inside_tree()); + } if (data.focus_mode==FOCUS_NONE) return;