浏览代码

Merge pull request #54330 from LennyPhoenix/lennyphoenix-patch-1

Rémi Verschelde 3 年之前
父节点
当前提交
86e0a0674a
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      scene/gui/control.cpp

+ 2 - 0
scene/gui/control.cpp

@@ -471,6 +471,8 @@ void Control::_notification(int p_notification) {
 			_size_changed();
 		} break;
 		case NOTIFICATION_EXIT_TREE: {
+			ERR_FAIL_COND(!get_viewport());
+
 			get_viewport()->_gui_remove_control(this);
 
 		} break;