modules/graphics/src/main/java/com/sun/javafx/tk/quantum/WindowStage.java
Print this page
@@ -806,11 +806,11 @@
/*
* RT-17588 - exit if stage is closed from under us as
* any further access to the Glass layer
* will throw an exception
*/
- if (enabled && platformWindow.isClosed()) {
+ if (enabled && platformWindow == null || platformWindow.isClosed()) {
return;
}
setPlatformEnabled(enabled);
if (enabled) {
if (isAppletStage && null != appletWindow) {
@@ -819,13 +819,15 @@
}
}
// Note: This method is required to workaround a glass issue mentioned in RT-12607
protected void requestToFront() {
+ if (platformWindow != null) {
platformWindow.toFront();
platformWindow.requestFocus();
}
+ }
public void setInEventHandler(boolean inEventHandler) {
this.inEventHandler = inEventHandler;
}