From 6199efbc7e56f05dfecc6961a840560b8f83e943 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 30 Jun 2016 18:54:54 -0300 Subject: [PATCH] throw error if GridContainer::set_columns goes below 1, closes #5316 (cherry picked from commit f6725f9768b8ba379106b26810c83b0bd110764b) --- scene/gui/grid_container.cpp | 1 + 1 file changed, 1 insertion(+) 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();