diff options
author | Dāvis Mosāns <davispuh@gmail.com> | 2016-01-08 04:12:13 +0200 |
---|---|---|
committer | Dāvis Mosāns <davispuh@gmail.com> | 2016-01-11 09:40:40 +0000 |
commit | c8af3160d2514fb973a0d00d5bac324d4f7159f7 (patch) | |
tree | 5b8b44db069021d45aaeba69e14723a78f75c0a0 /src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | |
parent | 1e2b42523f3a04fc3403ef6864bbcba447e4362c (diff) |
Don't pass NULL Display to glXGetClientString
glXGetCurrentDisplay can return NULL so need to check
for that.
Change-Id: I1b85a5c575d1deb24dcce4719b6f737283adeabe
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp index 8b14fc7d70..3412f3f3fc 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -644,7 +644,10 @@ void QGLXContext::queryDummyContext() oldSurface = oldContext->surface(); QScopedPointer<QSurface> surface; - const char *glxvendor = glXGetClientString(glXGetCurrentDisplay(), GLX_VENDOR); + Display *display = glXGetCurrentDisplay(); + const char *glxvendor = 0; + if (display) + glxvendor = glXGetClientString(display, GLX_VENDOR); if (glxvendor && !strcmp(glxvendor, "ATI")) { QWindow *window = new QWindow; window->resize(64, 64); |