aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-09 06:55:43 +0100
committerSven Gothel <[email protected]>2011-02-09 06:55:43 +0100
commitd1afec176d99fa6dc185cd83da33820655335903 (patch)
tree75c557389bb3e7fc43f5bd98c133f3e821dbf382
parentfbb775c52b210dd104d58f722c5d76bb570f1def (diff)
parentac03851ea77e02c36bdffab461e4a0d2a1971f2d (diff)
Merge branch 'bug_468_ClassCast_exception_on_debug_logging_try_2' of https://github.com/WadeWalker/jogl into WadeWalker-bug_468_ClassCast_exception_on_debug_logging_try_2
-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;
}