mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
UIScale: fixed NPE in getSystemScaleFactor() (occurred in progress bar on startup in NB)
This commit is contained in:
@@ -97,7 +97,7 @@ public class UIScale
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static double getSystemScaleFactor( GraphicsConfiguration gc ) {
|
public static double getSystemScaleFactor( GraphicsConfiguration gc ) {
|
||||||
return isSystemScalingEnabled() ? gc.getDefaultTransform().getScaleX() : 1;
|
return (isSystemScalingEnabled() && gc != null) ? gc.getDefaultTransform().getScaleX() : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---- user scaling (Java 8) ----------------------------------------------
|
//---- user scaling (Java 8) ----------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user