summaryrefslogtreecommitdiff
path: root/glx
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-09-30 11:33:16 +1000
committerDave Airlie <airlied@redhat.com>2009-10-02 08:47:13 +1000
commitcb54cf1b3e8c4109541cfb698542c00f2473e731 (patch)
tree3a55a830a2e4a6ea33aa22c6cedb9a2d533f9bd6 /glx
parent3d7cf468df96c0130a862f0d93fec990b9110c2f (diff)
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 <airlied@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'glx')
-rw-r--r--glx/glxext.c4
1 files 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)