diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-11-07 09:54:55 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-11-10 12:16:25 +0000 |
commit | 3c2cb87de2554b9c4f6e2080768fe9ede00aeab3 (patch) | |
tree | ed8abecb5b6dbb2796b8bea547aed09cc308423a /src/plugins/platforms/xcb/gl_integrations/xcb_glx | |
parent | e8364f9a4b481207ba6822827e143fb31eccfe51 (diff) |
xcb: Warn and bail out when even the basic, dummy context fails
Do not move on to glGet since the behavior is undefined.
Task-number: QTBUG-48986
Change-Id: Ifd279635ed1b8441f92697965d15ae3ecb59a7e3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/gl_integrations/xcb_glx')
-rw-r--r-- | src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 7 |
1 files changed, 5 insertions, 2 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 9bdedcc830..c2b7a562a9 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -672,8 +672,11 @@ void QGLXContext::queryDummyContext() } QOpenGLContext context; - context.create(); - context.makeCurrent(surface.data()); + if (!context.create() || !context.makeCurrent(surface.data())) { + qWarning("QGLXContext: Failed to create dummy context"); + m_supportsThreading = false; + return; + } m_supportsThreading = true; |