diff options
author | Timo Schwarzer <me@timoschwarzer.com> | 2019-01-03 13:59:37 +0100 |
---|---|---|
committer | Timo Schwarzer <me@timoschwarzer.com> | 2019-01-03 22:33:07 +0100 |
commit | a8f367a4b81a9a468eb7a953a0522f47ab18a54d (patch) | |
tree | 01b6ce4c847863130ca5ca7af1d7e58e1c73c082 | |
parent | 200be0795d1fc10c2628c00eafc0d276b669301e (diff) |
Check if p_child is not null in Container.fit_child_rect()
Fixes #24725
-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(); |