diff --git a/core/math/geometry.cpp b/core/math/geometry.cpp index 1b75a014c03..dedf1e0bc29 100644 --- a/core/math/geometry.cpp +++ b/core/math/geometry.cpp @@ -992,6 +992,10 @@ void Geometry::make_atlas(const Vector &p_rects, Vector &r_resu // 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());