Mesa (master): glx: Handle a null reply in QueryVersion.
Stephane Marchesin
marcheu at kemper.freedesktop.org
Tue Jun 12 21:48:43 UTC 2012
Module: Mesa
Branch: master
Commit: 0256edd709d976198d5354fdd88143d8da9e51d5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0256edd709d976198d5354fdd88143d8da9e51d5
Author: Stéphane Marchesin <marcheu at chromium.org>
Date: Thu May 24 17:58:53 2012 -0700
glx: Handle a null reply in QueryVersion.
Works around crashes when X connections break.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
NOTE: This is a candidate for the 8.0 branch.
---
src/glx/glxext.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
index 12fff22..a4e76c1 100644
--- a/src/glx/glxext.c
+++ b/src/glx/glxext.c
@@ -293,6 +293,9 @@ QueryVersion(Display * dpy, int opcode, int *major, int *minor)
GLX_MINOR_VERSION),
NULL);
+ if (!reply)
+ return GL_FALSE;
+
if (reply->major_version != GLX_MAJOR_VERSION) {
free(reply);
return GL_FALSE;
More information about the mesa-commit
mailing list