summaryrefslogtreecommitdiff
path: root/scene/gui/container.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-04 14:54:57 +0100
committerGitHub <noreply@github.com>2019-01-04 14:54:57 +0100
commitfa5ca1bbf0451017f388c660cd06bd141eb762b6 (patch)
tree9f137758dfa67afd6e2ee150cba17ca6ed5cee2c /scene/gui/container.cpp
parentbdbcf29246bad902e94c3a5fb1fd1abb06aeb2ae (diff)
parenta8f367a4b81a9a468eb7a953a0522f47ab18a54d (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.cpp1
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();