changeset 2924:a8ec7a461254

6576054: NullPointerException when closing tooltip by pressing esc Reviewed-by: rupashka
author alexp
date Fri, 17 Sep 2010 23:16:19 +0400
parents cdd64925de04
children e753db9c4416
files src/share/classes/javax/swing/ToolTipManager.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/ToolTipManager.java	Fri Sep 17 23:09:29 2010 +0400
+++ b/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();