summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/glxconvenience/qglxconvenience.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-03-11 12:57:41 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-03-11 16:28:14 +0000
commitddd0919bcf5bb630efce755cc21f364e36e23fca (patch)
treeedd266c0a5e0f7e962673d356759808fc4216a5c /src/platformsupport/glxconvenience/qglxconvenience.cpp
parentd6d902a990c6983aacfeba0b580f36fdc9666cbc (diff)
Do not crash on skipped Xlib visuals
If XLIB_SKIP_ARGB_VISUALS is set, we might fail to find visuals for supported configurations. Task-number: QTBUG-81904 Change-Id: Ib0d26faabe430925881b7f2acfc5361df3af416b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/platformsupport/glxconvenience/qglxconvenience.cpp')
-rw-r--r--src/platformsupport/glxconvenience/qglxconvenience.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp
index 81bccb1c25..e2f4922c8a 100644
--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp
+++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp
@@ -224,6 +224,8 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format
}
QXlibPointer<XVisualInfo> visual(glXGetVisualFromFBConfig(display, candidate));
+ if (!visual)
+ continue;
int actualRed;
int actualGreen;
int actualBlue;