summaryrefslogtreecommitdiffstats
path: root/src/core/api/qtwebenginecoreglobal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/api/qtwebenginecoreglobal.cpp')
-rw-r--r--src/core/api/qtwebenginecoreglobal.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp
index 0e857d7d9..e60e6139e 100644
--- a/src/core/api/qtwebenginecoreglobal.cpp
+++ b/src/core/api/qtwebenginecoreglobal.cpp
@@ -75,6 +75,11 @@ QWEBENGINE_PRIVATE_EXPORT void initialize()
qFatal("QtWebEngine::initialize() must be called after the construction of the application object.");
return;
}
+
+ // Bail out silently if the user did not construct a QGuiApplication.
+ if (!qobject_cast<QGuiApplication *>(app))
+ return;
+
if (app->thread() != QThread::currentThread()) {
qFatal("QtWebEngine::initialize() must be called from the Qt gui thread.");
return;