6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
authortdv
Tue, 21 Oct 2008 08:25:38 -0700
changeset 1730 2482c2865beb
parent 1729 dee3a249a81b
child 1731 830101735cdb
6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash Reviewed-by: campbell
jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java
jdk/src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java
--- a/jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java	Mon Oct 20 11:52:47 2008 -0700
+++ b/jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java	Tue Oct 21 08:25:38 2008 -0700
@@ -120,12 +120,14 @@
                 new GLXGetConfigInfo(device.getScreen(), visualnum);
             rq.flushAndInvokeNow(action);
             cfginfo = action.getConfigInfo();
-            OGLContext.setScratchSurface(cfginfo);
-            rq.flushAndInvokeNow(new Runnable() {
-                public void run() {
-                    ids[0] = OGLContext.getOGLIdString();
-                }
-            });
+            if (cfginfo != 0L) {
+                OGLContext.setScratchSurface(cfginfo);
+                rq.flushAndInvokeNow(new Runnable() {
+                    public void run() {
+                        ids[0] = OGLContext.getOGLIdString();
+                    }
+                });
+            }
         } finally {
             rq.unlock();
         }
--- a/jdk/src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java	Mon Oct 20 11:52:47 2008 -0700
+++ b/jdk/src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java	Tue Oct 21 08:25:38 2008 -0700
@@ -127,12 +127,14 @@
                 new WGLGetConfigInfo(device.getScreen(), pixfmt);
             rq.flushAndInvokeNow(action);
             cfginfo = action.getConfigInfo();
-            OGLContext.setScratchSurface(cfginfo);
-            rq.flushAndInvokeNow(new Runnable() {
-                public void run() {
-                    ids[0] = OGLContext.getOGLIdString();
-                }
-            });
+            if (cfginfo != 0L) {
+                OGLContext.setScratchSurface(cfginfo);
+                rq.flushAndInvokeNow(new Runnable() {
+                    public void run() {
+                        ids[0] = OGLContext.getOGLIdString();
+                    }
+                });
+            }
         } finally {
             rq.unlock();
         }