diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration.cpp index 99a1f7fd51e..930648b3ea6 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; }