6826104: Getting a NullPointer exception when clicked on Application & Toolkit Modal dialog
authoranthony
Fri, 17 Apr 2009 16:16:14 +0400
changeset 2642 d08c8f125592
parent 2641 b3d0aab4657e
child 2643 ea218b1a2000
6826104: Getting a NullPointer exception when clicked on Application & Toolkit Modal dialog Summary: The addition of window peers to the windows collection has been restored in XWindowPeer. Reviewed-by: art, dcherepanov
jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java
--- a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Thu Apr 16 23:14:12 2009 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Fri Apr 17 16:16:14 2009 +0400
@@ -146,6 +146,13 @@
 
         params.put(OVERRIDE_REDIRECT, Boolean.valueOf(isOverrideRedirect()));
 
+        SunToolkit.awtLock();
+        try {
+            windows.add(this);
+        } finally {
+            SunToolkit.awtUnlock();
+        }
+
         cachedFocusableWindow = isFocusableWindow();
 
         Font f = target.getFont();