From 0e247d671de9953dccd7af6f3121e522a7174344 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 19 Dec 2006 00:40:45 +0000 Subject: Fixed NullPointerException in new cached GLCapabilities code on X11 platforms pointed out by bleb on javagaming.org forums git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1028 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/classes') 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) { -- cgit v1.2.3