diff options
author | Stéphane Marchesin <[email protected]> | 2012-05-24 17:58:53 -0700 |
---|---|---|
committer | Stéphane Marchesin <[email protected]> | 2012-06-12 14:42:22 -0700 |
commit | 0256edd709d976198d5354fdd88143d8da9e51d5 (patch) | |
tree | e5dfe87a83679cca9cb4943c6aae227379c35203 /src/glx/glxext.c | |
parent | 1657dec72d6dcb6158bb65cea2e1b6ff2445746c (diff) |
glx: Handle a null reply in QueryVersion.
Works around crashes when X connections break.
Reviewed-by: Ian Romanick <[email protected]>
NOTE: This is a candidate for the 8.0 branch.
Diffstat (limited to 'src/glx/glxext.c')
-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; |