diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/math/geometry_2d.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/math/geometry_2d.cpp b/core/math/geometry_2d.cpp index 783750b9e6..d67be14d33 100644 --- a/core/math/geometry_2d.cpp +++ b/core/math/geometry_2d.cpp @@ -94,6 +94,10 @@ void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_re // 256x8192 atlas (won't work anywhere). ERR_FAIL_COND(p_rects.size() == 0); + for (int i = 0; i < p_rects.size(); i++) { + ERR_FAIL_COND(p_rects[i].width <= 0); + ERR_FAIL_COND(p_rects[i].height <= 0); + } Vector<_AtlasWorkRect> wrects; wrects.resize(p_rects.size()); |