changeset 766:452c58b2f533

6755274: 6u10b33 2d tests fails on sles10x64 with jvm crash Reviewed-by: campbell
author tdv
date Tue, 21 Oct 2008 08:25:38 -0700
parents 665850610378
children c739feb28074
files src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java
diffstat 2 files changed, 16 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/java2d/opengl/GLXGraphicsConfig.java	Mon Oct 20 11:52:47 2008 -0700
+++ b/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/src/windows/classes/sun/java2d/opengl/WGLGraphicsConfig.java	Mon Oct 20 11:52:47 2008 -0700
+++ b/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();
         }