Browse Source

Prevent NPE when desktopHints are null.

pull/214/head v2.4.9-rc1
weisj 4 years ago
parent
commit
295a08c32b
  1. 4
      core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java

4
core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java

@ -124,6 +124,10 @@ public class FontDefaultsInitTask implements DefaultsInitTask {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Map<?, ?> desktopHints = (Map<?, ?>) toolkit.getDesktopProperty(GraphicsUtil.DESKTOP_HINTS_KEY);
if (desktopHints == null) {
desktopHints = Collections.emptyMap();
}
Object aaHint = desktopHints.get(RenderingHints.KEY_TEXT_ANTIALIASING);
Object lcdContrastHint = desktopHints.get(RenderingHints.KEY_TEXT_LCD_CONTRAST);

Loading…
Cancel
Save