check for null dpy in Fake_glXGetConfig()
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 12 Dec 2003 00:01:17 +0000 (00:01 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 12 Dec 2003 00:01:17 +0000 (00:01 +0000)
src/mesa/drivers/x11/fakeglx.c

index 1bab6d91a4189c6a3d42f752e900fa35a9a747f6..98003b085813b11ffb56d2e7ca76d2cd594c0d5c 100644 (file)
@@ -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 */