summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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) ) {