From cb54cf1b3e8c4109541cfb698542c00f2473e731 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 30 Sep 2009 11:33:16 +1000 Subject: [PATCH] glx: fixup deref of null pointer when glx screen init fails. I think this is what the original author wanted. Signed-off-by: Dave Airlie Acked-by: Ian Romanick --- glx/glxext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glx/glxext.c b/glx/glxext.c index 2de8b8405..9f9c0ed1f 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)