diff -Naur qtbase.old/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp --- qtbase.old/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp 2015-10-13 07:35:27.000000000 +0300 +++ qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp 2016-01-12 12:31:11.611299079 +0300 @@ -644,7 +644,10 @@ oldSurface = oldContext->surface(); QScopedPointer 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); @@ -661,7 +664,7 @@ context.create(); context.makeCurrent(surface.data()); - m_supportsThreading = true; + m_supportsThreading = (glxvendor != 0); if (const char *renderer = (const char *) glGetString(GL_RENDERER)) { for (int i = 0; qglx_threadedgl_blacklist_renderer[i]; ++i) { diff -Naur qtbase.old/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp --- qtbase.old/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp 2016-01-12 12:27:34.286354000 +0300 +++ qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp 2016-01-12 12:18:47.176232504 +0300 @@ -195,7 +195,10 @@ static bool glxPbufferUsable = true; if (!vendorChecked) { vendorChecked = true; - 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")) glxPbufferUsable = false; }