소스 검색

Check if p_child is not null in Container.fit_child_rect()
Fixes #24725

Timo Schwarzer 6 년 전
부모
커밋
a8f367a4b8
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      scene/gui/container.cpp

+ 1 - 0
scene/gui/container.cpp

@@ -95,6 +95,7 @@ void Container::_sort_children() {
 
 void Container::fit_child_in_rect(Control *p_child, const Rect2 &p_rect) {
 
+	ERR_FAIL_COND(!p_child);
 	ERR_FAIL_COND(p_child->get_parent() != this);
 
 	Size2 minsize = p_child->get_combined_minimum_size();