summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAndreas Haas <Hinsbart@users.noreply.github.com>2017-10-02 22:42:38 +0200
committerGitHub <noreply@github.com>2017-10-02 22:42:38 +0200
commit2fbffb7cde4c29f56dcfeeb04a7ec2be23e3ab96 (patch)
treecb3cdd70d6ed0e89045616cdecbe5816cc5a1e01 /core
parent7cfbef91b30e191f9d7b9d950da8a0345ac8761a (diff)
parent40dcf4a2e75b497f4147547a880c57bc8e14a6aa (diff)
Merge pull request #11730 from gabrielformiga/fix-small-png-texture-import
Change to Image::shrink_x2 function preventing it set a 0 width/height for mipmapped textures
Diffstat (limited to 'core')
-rw-r--r--core/image.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/image.cpp b/core/image.cpp
index 70a7b2bceb..c7f21d5599 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 {