[PATCH] glx: fixup deref of null pointer when glx screen init fails.

Dave Airlie airlied at redhat.com
Tue Sep 29 18:39:43 PDT 2009


From: Dave Airlie <airlied at linux.ie>

I think this is what the original author wanted.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 glx/glxext.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/glx/glxext.c b/glx/glxext.c
index 2de8b84..0737420 100644
--- a/glx/glxext.c
+++ b/glx/glxext.c
@@ -364,14 +364,14 @@ void GlxExtensionInit(void)
 
 	    glxScreen = p->screenProbe(pScreen);
 	    if (glxScreen != NULL) {
+	    	if (glxScreen->GLXminor < glxMinorVersion)
+		    glxMinorVersion = glxScreen->GLXminor;
 		LogMessage(X_INFO,
 			   "GLX: Initialized %s GL provider for screen %d\n",
 			   p->name, i);
 		break;
 	    }
 
-	    if (glxScreen->GLXminor < glxMinorVersion)
-		glxMinorVersion = glxScreen->GLXminor;
 	}
 
 	if (!p)
-- 
1.6.4.2



More information about the xorg-devel mailing list