From 52f895df518608321873f53d6f8549bdbaf0059a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 30 Jun 2009 08:27:28 -0600 Subject: [PATCH] glx: fix null pointer dereference segfault (bug 22546) --- src/glx/x11/glxcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c index 77471b8599c..820d8b98685 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; } -- 2.30.2