*** 179,188 **** --- 179,191 ---- // we do not expect that this may happen, the only response // is to re-initialize the list of devices initDevices(); d = devices.get(mainDisplayID); + if (d == null) { + throw new AWTError("no screen devices"); + } } return d; } @Override