diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-30 18:54:54 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-30 18:54:54 -0300 |
commit | f6725f9768b8ba379106b26810c83b0bd110764b (patch) | |
tree | bfe8bbd68496310b01b4d1601e49ec273b1fa67d /scene | |
parent | b391306828294bc28675e135e7c2232ac6b8305a (diff) |
throw error if GridContainer::set_columns goes below 1, closes #5316
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/grid_container.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp index dde9768a6d..5e6622b3f8 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(); minimum_size_changed(); |