UIScale: fixed NPE in getSystemScaleFactor(Graphics2D) when using Batik SVGGraphics2D (issue #226)

This commit is contained in:
Karl Tauber
2020-12-15 11:25:00 +01:00
parent 5155ec93c9
commit 460f0d9dee

View File

@@ -113,7 +113,7 @@ public class UIScale
}
public static double getSystemScaleFactor( Graphics2D g ) {
return isSystemScalingEnabled() ? g.getDeviceConfiguration().getDefaultTransform().getScaleX() : 1;
return isSystemScalingEnabled() ? getSystemScaleFactor( g.getDeviceConfiguration() ) : 1;
}
public static double getSystemScaleFactor( GraphicsConfiguration gc ) {