From cd6d805d9368a0e84cc20a416ab88603c4be6a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 14 Dec 2020 13:09:46 +0100 Subject: offscreen: always create a valid QPlatformIntegration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- src/plugins/platforms/offscreen/qoffscreenintegration.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/offscreen') 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; } -- cgit v1.2.3