Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
8288854: getLocalGraphicsEnvironment() on for multi-screen setups thr…
…ows exception NPE

Reviewed-by: azvegint, aivanov
  • Loading branch information
mrserb committed Jul 2, 2022
1 parent 9925014 commit cfc9a88
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -236,7 +236,7 @@ private synchronized void initDevices() {
throw new AWTError("no screen devices");
}
int index = getDefaultScreenNum();
mainScreen = 0 < index && index < screens.length ? index : 0;
mainScreen = 0 < index && index < numScreens ? index : 0;

for (int id = 0; id < numScreens; ++id) {
devices.put(id, old.containsKey(id) ? old.remove(id) :
Expand Down

1 comment on commit cfc9a88

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.