diff --git a/core/image.cpp b/core/image.cpp index 70a7b2bceb1..c7f21d55991 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1013,8 +1013,8 @@ void Image::shrink_x2() { copymem(w.ptr(), &r[ofs], new_size); } - width /= 2; - height /= 2; + width = MAX(width / 2, 1); + height = MAX(height / 2, 1); data = new_img; } else {