aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/x11')
-rw-r--r--src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
index 4f92681d0..093f31232 100644
--- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
+++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java
@@ -191,8 +191,10 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl {
}
// Store these away for later
for (int i = 0; i < infos.length; i++) {
- visualToGLCapsMap.put(new ScreenAndVisualIDKey(screen, infos[i].visualid()),
- caps[i].clone());
+ if (caps[i] != null) {
+ visualToGLCapsMap.put(new ScreenAndVisualIDKey(screen, infos[i].visualid()),
+ caps[i].clone());
+ }
}
int chosen = chooser.chooseCapabilities(capabilities, caps, recommendedIndex);
if (chosen < 0 || chosen >= caps.length) {