summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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();