diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index a66d62485..40271d284 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/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; } |