diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index a514f1b3d7b..bbf8bc91946 100644 --- a/scene/gui/grid_container.cpp +++ b/scene/gui/grid_container.cpp @@ -156,6 +156,7 @@ void GridContainer::_notification(int p_what) { void GridContainer::set_columns(int p_columns) { + ERR_FAIL_COND(p_columns<1); columns=p_columns; queue_sort();