1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Change to shrink_x2 function preventing it set a 0 width/height

This commit is contained in:
Gabriel
2017-09-30 17:21:10 -03:00
parent 42e2821d04
commit 40dcf4a2e7

View File

@@ -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 {