mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix division by zero
This commit is contained in:
@@ -80,7 +80,7 @@ public class JBHiDPIScaledImage extends BufferedImage {
|
||||
myImage = image;
|
||||
myUserWidth = width;
|
||||
myUserHeight = height;
|
||||
myScale = myImage.getWidth(null) / myUserWidth;
|
||||
myScale = myUserWidth > 0 ? myImage.getWidth(null) / myUserWidth : 1f;
|
||||
}
|
||||
|
||||
public float getScale() {
|
||||
|
||||
Reference in New Issue
Block a user