summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2020-12-14 13:09:46 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2020-12-21 23:48:06 +0100
commitcd6d805d9368a0e84cc20a416ab88603c4be6a9c (patch)
tree920feeba99b0acdffbcaaaa3b0604aa4a21dc44d /src/plugins/platforms
parent79cb003020b7cf193835483c3fac2de04a0b50e3 (diff)
offscreen: always create a valid QPlatformIntegration
Commit f4a66e5c accidentally made it so that the offscreen plugin would produce a null QPlatformIntegration on X11 if QT_QPA_OFFSCREEN_NO_GLX is set. Restore previous logic where the generic QOffscreenIntegration is created if the X11 code path did not create an object. Change-Id: Ic71fb04bbd824f4121480dbaf8fa0571ebb39f42 Pick-to: 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
index 99a1f7fd51..930648b3ea 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp
@@ -321,10 +321,11 @@ QOffscreenIntegration *QOffscreenIntegration::createOffscreenIntegration(const Q
QByteArray glx = qgetenv("QT_QPA_OFFSCREEN_NO_GLX");
if (glx.isEmpty())
offscreenIntegration = new QOffscreenX11Integration;
-#else
- offscreenIntegration = new QOffscreenIntegration;
#endif
+ if (!offscreenIntegration)
+ offscreenIntegration = new QOffscreenIntegration;
+
offscreenIntegration->configure(paramList);
return offscreenIntegration;
}