6576054: NullPointerException when closing tooltip by pressing esc
authoralexp
Fri, 17 Sep 2010 23:16:19 +0400
changeset 6650 9fccd23d7199
parent 6649 3a9910603ab2
child 6651 f3f6465a128e
6576054: NullPointerException when closing tooltip by pressing esc Reviewed-by: rupashka
jdk/src/share/classes/javax/swing/ToolTipManager.java
--- a/jdk/src/share/classes/javax/swing/ToolTipManager.java	Fri Sep 17 23:09:29 2010 +0400
+++ b/jdk/src/share/classes/javax/swing/ToolTipManager.java	Fri Sep 17 23:16:19 2010 +0400
@@ -459,7 +459,7 @@
         if (insideComponent == null) {
             // Drag exit
         }
-        if (window != null && event.getSource() == window) {
+        if (window != null && event.getSource() == window && insideComponent != null) {
           // if we get an exit and have a heavy window
           // we need to check if it if overlapping the inside component
             Container insideComponentWindow = insideComponent.getTopLevelAncestor();