From b587614653bc9fcd5b11934fc4aca7fe58d5d3a0 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 1 Feb 2016 19:00:19 -0300 Subject: Make sure variant parser recognizes "nil" for compatibility with old engine.cfg style cofig. Closes #3531 --- scene/gui/control.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scene/gui') diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 71a0f50240..c319e306e0 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; -- cgit v1.2.3