8288854: getLocalGraphicsEnvironment() on for multi-screen setups throws exception NPE
Reviewed-by: azvegint, aivanov
This commit is contained in:
parent
9925014035
commit
cfc9a881af
@ -236,7 +236,7 @@ public final class X11GraphicsEnvironment extends SunGraphicsEnvironment {
|
||||
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) :
|
||||
|
Loading…
x
Reference in New Issue
Block a user