summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/x11/fakeglx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 1bab6d91a41..98003b08581 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1727,6 +1727,9 @@ Fake_glXGetConfig( Display *dpy, XVisualInfo *visinfo,
{
XMesaVisual xmvis;
+ if (!dpy || !visInfo)
+ return GLX_BAD_ATTRIBUTE;
+
xmvis = find_glx_visual( dpy, visinfo );
if (!xmvis) {
/* this visual wasn't obtained with glXChooseVisual */