summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-30 08:27:28 -0600
committerBrian Paul <brianp@vmware.com>2009-06-30 08:43:22 -0600
commit52f895df518608321873f53d6f8549bdbaf0059a (patch)
tree001da278969609b52633a8f43d5153b68ac6fbe8 /src/glx
parent14a2b5445a653e9a8258873300df8f04ac099e60 (diff)
glx: fix null pointer dereference segfault (bug 22546)
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/x11/glxcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 77471b8599..820d8b9868 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -164,7 +164,7 @@ GetGLXScreenConfigs(Display *dpy, int scrn)
{
__GLXdisplayPrivate * const priv = __glXInitialize(dpy);
- return (priv->screenConfigs != NULL) ? &priv->screenConfigs[scrn] : NULL;
+ return (priv && priv->screenConfigs != NULL) ? &priv->screenConfigs[scrn] : NULL;
}