summaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl')
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index ee3f8ae1f..7e3de8abb 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -153,7 +153,10 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
int numFormats = pformats.length;
ArrayList bucket = new ArrayList(numFormats);
for (int i = 0; i < numFormats; i++) {
- bucket.add( WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(glProfile, hdc, pformats[i], onscreen) );
+ WGLGLCapabilities wglglcapabilities = WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(glProfile, hdc, pformats[i], onscreen);
+ // formats that don't draw to a window come back null; don't add them or they'll crash debug output
+ if( wglglcapabilities != null )
+ bucket.add( wglglcapabilities );
}
return bucket;
}