mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
glx: added null pointer check in glXGetFBConfigs()
Fixes segfault seen with glxinfo with NVIDIA OpenGL.
This commit is contained in:
parent
0115a4f8f1
commit
05471828dc
1 changed files with 2 additions and 1 deletions
|
|
@ -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) ) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue