6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash
Reviewed-by: campbell
--- 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();
}