Module: Mesa
Branch: mesa_7_5_branch
Commit: 52f895df518608321873f53d6f8549bdbaf0059a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=52f895df518608321873f53d6f8549bdbaf0059a

Author: Brian Paul <[email protected]>
Date:   Tue Jun 30 08:27:28 2009 -0600

glx: fix null pointer dereference segfault (bug 22546)

---

 src/glx/x11/glxcmds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 77471b8..820d8b9 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;
 }
 
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to