summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanikoyes <sanikoyes@163.com>2016-04-07 15:46:38 +0800
committersanikoyes <sanikoyes@163.com>2016-04-07 15:46:38 +0800
commit5ec7d3f264bd01f38046e52af28d950054cdce0b (patch)
tree7ba7726c29d33f7eb9ea958c71e310fed4090ce6
parent3e3f16fefc4dc8b9ffa40d3357f0959ac17163e7 (diff)
Fix warn print when hide an control does not inside_tree
-rw-r--r--scene/gui/control.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index b393f926e7..a30c05527c 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -604,8 +604,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