Переглянути джерело

Merge pull request #4257 from sanikoyes/Pr-gui-fix-warn

Fix warn print when hide an control does not inside_tree
Rémi Verschelde 9 роки тому
батько
коміт
33d63f42f5
1 змінених файлів з 5 додано та 2 видалено
  1. 5 2
      scene/gui/control.cpp

+ 5 - 2
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