-
Bug
-
Resolution: Fixed
-
P3
-
8
-
None
@Override public void start(Stage stage) throws IOException {
Popup popup = new Popup();
popup.show(stage, 0, 0);
}
Caused by: java.lang.NullPointerException
at javafx.stage.PopupWindow.showImpl(PopupWindow.java:435)
at javafx.stage.PopupWindow.show(PopupWindow.java:414)
Fix is
diff -r ee2deaadbc15 modules/graphics/src/main/java/javafx/stage/PopupWindow.java
--- a/modules/graphics/src/main/java/javafx/stage/PopupWindow.java Wed Oct 30 21:47:34 2013 -0400
+++ b/modules/graphics/src/main/java/javafx/stage/PopupWindow.java Thu Oct 31 08:36:54 2013 -0400
@@ -432,8 +432,10 @@
//RT-28447
final Scene ownerScene = getRootWindow(owner).getScene();
- sceneValue.getStylesheets().setAll(ownerScene.getStylesheets());
-
+ if (ownerScene != null) {
+ sceneValue.getStylesheets().setAll(ownerScene.getStylesheets());
+ }
+
// It is required that the root window exist and be visible to show the popup.
if (getRootWindow(owner).isShowing()) {
// We do show() first so that the width and height of the
Popup popup = new Popup();
popup.show(stage, 0, 0);
}
Caused by: java.lang.NullPointerException
at javafx.stage.PopupWindow.showImpl(PopupWindow.java:435)
at javafx.stage.PopupWindow.show(PopupWindow.java:414)
Fix is
diff -r ee2deaadbc15 modules/graphics/src/main/java/javafx/stage/PopupWindow.java
--- a/modules/graphics/src/main/java/javafx/stage/PopupWindow.java Wed Oct 30 21:47:34 2013 -0400
+++ b/modules/graphics/src/main/java/javafx/stage/PopupWindow.java Thu Oct 31 08:36:54 2013 -0400
@@ -432,8 +432,10 @@
//
final Scene ownerScene = getRootWindow(owner).getScene();
- sceneValue.getStylesheets().setAll(ownerScene.getStylesheets());
-
+ if (ownerScene != null) {
+ sceneValue.getStylesheets().setAll(ownerScene.getStylesheets());
+ }
+
// It is required that the root window exist and be visible to show the popup.
if (getRootWindow(owner).isShowing()) {
// We do show() first so that the width and height of the