# HG changeset patch # User tdv # Date 1224602738 25200 # Node ID 2482c2865bebe5a6f14d7efabc9830f268752262 # Parent dee3a249a81b86173943f798ee3491fe9f09a558 6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash Reviewed-by: campbell diff -r dee3a249a81b -r 2482c2865beb jdk/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.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(); } diff -r dee3a249a81b -r 2482c2865beb jdk/src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java --- 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(); }