From 76eeb457d399f082497b2ebe69be03ec8fc0bf3c Mon Sep 17 00:00:00 2001 From: sanikoyes Date: Thu, 7 Apr 2016 15:46:38 +0800 Subject: [PATCH] Fix warn print when hide an control does not inside_tree (cherry picked from commit 5ec7d3f264bd01f38046e52af28d950054cdce0b) --- scene/gui/control.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index e728a8807ee..77f54313d8b 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -524,8 +524,11 @@ void Control::_notification(int p_notification) { if(get_viewport() != NULL) get_viewport()->_gui_hid_control(this); - _modal_stack_remove(); - minimum_size_changed(); + + if(is_inside_tree()) { + _modal_stack_remove(); + minimum_size_changed(); + } //remove key focus //remove modalness