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>bb10
parent
1e2b42523f
commit
c8af3160d2
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -195,7 +195,10 @@ QPlatformOffscreenSurface *QXcbGlxIntegration::createPlatformOffscreenSurface(QO
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue