소스 검색

Fix warn print when hide an control does not inside_tree

sanikoyes 9 년 전
부모
커밋
5ec7d3f264
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