diff options
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations')
-rw-r--r-- | src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp index 8aabde8129..8d5bfb13d3 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.cpp @@ -62,7 +62,10 @@ void QXcbGlxWindow::resolveFormat() void *QXcbGlxWindow::createVisual() { - return qglx_findVisualInfo(DISPLAY_FROM_XCB(m_screen), m_screen->screenNumber(), &m_format); + QXcbScreen *scr = xcbScreen(); + if (!scr) + return Q_NULLPTR; + return qglx_findVisualInfo(DISPLAY_FROM_XCB(scr), scr->screenNumber(), &m_format); } QT_END_NAMESPACE |