aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Haas2017-10-02 22:42:38 +0200
committerGitHub2017-10-02 22:42:38 +0200
commit2fbffb7cde4c29f56dcfeeb04a7ec2be23e3ab96 (patch)
treecb3cdd70d6ed0e89045616cdecbe5816cc5a1e01
parent7cfbef91b30e191f9d7b9d950da8a0345ac8761a (diff)
parent40dcf4a2e75b497f4147547a880c57bc8e14a6aa (diff)
downloadgodot-2fbffb7cde4c29f56dcfeeb04a7ec2be23e3ab96.tar.gz
godot-2fbffb7cde4c29f56dcfeeb04a7ec2be23e3ab96.tar.zst
godot-2fbffb7cde4c29f56dcfeeb04a7ec2be23e3ab96.zip
-rw-r--r--core/image.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/image.cpp b/core/image.cpp
index 70a7b2bce..c7f21d559 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 {