projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0115a4f
)
glx: added null pointer check in glXGetFBConfigs()
author
Brian Paul
<brianp@vmware.com>
Wed, 15 Apr 2009 14:01:01 +0000
(08:01 -0600)
committer
Brian Paul
<brianp@vmware.com>
Wed, 15 Apr 2009 14:01:45 +0000
(08:01 -0600)
Fixes segfault seen with glxinfo with NVIDIA OpenGL.
src/glx/x11/glxcmds.c
patch
|
blob
|
history
diff --git
a/src/glx/x11/glxcmds.c
b/src/glx/x11/glxcmds.c
index e5c0db4c968dec65a98713f214521472dd6c799f..b9e0706d312c66717dac50e808d0858f6fce7b49 100644
(file)
--- 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) ) {