changeset 4387:8d3d5313f667

RT-31750 Mac: NPE when quitting a JavaFX app Reviewed-by: art, anthony
author Petr Pchelko <petr.pchelko@oracle.com>
date Mon, 22 Jul 2013 11:28:18 +0400
parents 23dceeb90d32
children 4c672a0142c4
files modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassStage.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassStage.java	Mon Jul 22 11:15:47 2013 +0400
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/GlassStage.java	Mon Jul 22 11:28:18 2013 +0400
@@ -166,7 +166,9 @@
     // Cmd+Q action
     static void requestClosingAllWindows() {
         for (final GlassStage window : windows.toArray(new GlassStage[windows.size()])) {
-            if (window.isVisible() && window.stageListener != null) {
+            // In case of child windows some of them could already be closed
+            // so check if list still contains an object
+            if (windows.contains(window) && window.isVisible() && window.stageListener != null) {
                 AccessController.doPrivileged(new PrivilegedAction<Void>() {
                     @Override
                     public Void run() {