diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-04 14:54:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-04 14:54:57 +0100 |
commit | fa5ca1bbf0451017f388c660cd06bd141eb762b6 (patch) | |
tree | 9f137758dfa67afd6e2ee150cba17ca6ed5cee2c /scene/gui/container.cpp | |
parent | bdbcf29246bad902e94c3a5fb1fd1abb06aeb2ae (diff) | |
parent | a8f367a4b81a9a468eb7a953a0522f47ab18a54d (diff) |
Merge pull request #24738 from timoschwarzer/24725-fit-child-in-rect-null-check
Check if p_child is not null in Container.fit_child_rect()
Diffstat (limited to 'scene/gui/container.cpp')
-rw-r--r-- | scene/gui/container.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp index c58975d332..2579321773 100644 --- a/scene/gui/container.cpp +++ b/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(); |