changeset 1099:c6503f2a93d1

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
author anthony
date Fri, 17 Apr 2009 16:16:14 +0400
parents 6f4446ca5499
children 9124b0123df3
files src/solaris/classes/sun/awt/X11/XWindowPeer.java
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Thu Apr 16 23:14:12 2009 -0700
+++ b/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();