Browse Source

Merge pull request #4119 from sanikoyes/Pr-crash-exit-tree

Fix GDScript crash when call show/hide in func _exit_tree
Rémi Verschelde 9 năm trước cách đây
mục cha
commit
8c2771b6d5
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      scene/gui/control.cpp

+ 2 - 2
scene/gui/control.cpp

@@ -525,8 +525,8 @@ void Control::_notification(int p_notification) {
 
 			if (!is_visible()) {
 
-
-				get_viewport()->_gui_hid_control(this);
+				if(get_viewport() != NULL)
+					get_viewport()->_gui_hid_control(this);
 				_modal_stack_remove();
 				minimum_size_changed();