diff options
Diffstat (limited to 'src/core/api/qtwebenginecoreglobal.cpp')
-rw-r--r-- | src/core/api/qtwebenginecoreglobal.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp index e16f9c727..3c2eefdf5 100644 --- a/src/core/api/qtwebenginecoreglobal.cpp +++ b/src/core/api/qtwebenginecoreglobal.cpp @@ -197,7 +197,10 @@ static void initialize() #if QT_CONFIG(opengl) if (QCoreApplication::instance()) { // On window/ANGLE, calling QtWebEngineQuick::initialize from DllMain will result in a crash. - if (!qt_gl_global_share_context()) { + if (!qt_gl_global_share_context() && + !(QCoreApplication::testAttribute(Qt::AA_ShareOpenGLContexts) && + QQuickWindow::graphicsApi() == QSGRendererInterface::OpenGLRhi) + ) { qWarning("Qt WebEngine seems to be initialized from a plugin. Please " "set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute and " "QSGRendererInterface::OpenGLRhi using QQuickWindow::setGraphicsApi " |