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.
This commit is contained in:
parent
1657dec72d
commit
0256edd709
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue