summaryrefslogtreecommitdiff
path: root/src/glx/x11/glxcmds.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-04-15 08:01:01 -0600
committerBrian Paul <brianp@vmware.com>2009-04-15 08:01:45 -0600
commit05471828dc8dd4a184d4467b66e9c08449d1d4c9 (patch)
treefc639c5dfe43c1317e340e63349ea912d0044dc5 /src/glx/x11/glxcmds.c
parent0115a4f8f1952b166eaad09f317ff8bc465e0f28 (diff)
glx: added null pointer check in glXGetFBConfigs()
Fixes segfault seen with glxinfo with NVIDIA OpenGL.
Diffstat (limited to 'src/glx/x11/glxcmds.c')
-rw-r--r--src/glx/x11/glxcmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index e5c0db4c96..b9e0706d31 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -1702,7 +1702,8 @@ PUBLIC GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
int i;
*nelements = 0;
- if ( (priv->screenConfigs != NULL)
+ if ( priv
+ && (priv->screenConfigs != NULL)
&& (screen >= 0) && (screen <= ScreenCount(dpy))
&& (priv->screenConfigs[screen].configs != NULL)
&& (priv->screenConfigs[screen].configs->fbconfigID != GLX_DONT_CARE) ) {