diff options
author | Stéphane Marchesin <marcheu@chromium.org> | 2012-05-24 17:58:53 -0700 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2012-06-27 20:02:47 +0200 |
commit | 83444581acd1f6eed221352fe081e2e34a0c6a74 (patch) | |
tree | ba7fa424dc71c8ab16e754cf9ccbdc7e34a9bb25 | |
parent | 9f2844896c4f3b49ba2e30fc55459d048175101c (diff) |
glx: Handle a null reply in QueryVersion.
Works around crashes when X connections break.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
NOTE: This is a candidate for the 8.0 branch.
(cherry picked from commit 0256edd709d976198d5354fdd88143d8da9e51d5)
-rw-r--r-- | 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 12fff22399d..a4e76c1c398 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; |