changeset 5405:348fea6059d2

7184845: Apps6: menu tree bean in form throws npe in jre 7 while closing Reviewed-by: anthony, serb
author denis
date Mon, 23 Jul 2012 21:52:27 +0400
parents bf941141d1bf
children 038b17edbb4b
files src/windows/classes/sun/awt/windows/WComponentPeer.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/windows/classes/sun/awt/windows/WComponentPeer.java	Fri Jul 20 23:53:10 2012 +0400
+++ b/src/windows/classes/sun/awt/windows/WComponentPeer.java	Mon Jul 23 21:52:27 2012 +0400
@@ -419,8 +419,12 @@
     public void createScreenSurface(boolean isResize)
     {
         Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration();
+        if (gc == null) {
+            surfaceData = null;
+            return;
+        }
+
         ScreenUpdateManager mgr = ScreenUpdateManager.getInstance();
-
         surfaceData = mgr.createScreenSurface(gc, this, numBackBuffers, isResize);
     }