changeset 8931:ad5669aafe66

RT-40489: NPE in javafx.embed.swing.JFXPanel$HostContainer
author ant <anton.tarasov@oracle.com>
date Thu, 09 Apr 2015 18:41:49 +0300
parents ecf20572029f
children a1b4605aeb1c
files modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java	Thu Apr 09 13:50:30 2015 +0300
+++ b/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java	Thu Apr 09 18:41:49 2015 +0300
@@ -926,8 +926,10 @@
             scenePeer = embeddedScene;
             if (scenePeer == null) {
                 invokeOnClientEDT(() -> {
-                    dnd.removeNotify();
-                    dnd = null;
+                    if (dnd != null) {
+                        dnd.removeNotify();
+                        dnd = null;
+                    }
                 });
                 return;
             }