diff options
Diffstat (limited to 'src/dbus/qdbusconnectionmanager.cpp')
-rw-r--r-- | src/dbus/qdbusconnectionmanager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dbus/qdbusconnectionmanager.cpp b/src/dbus/qdbusconnectionmanager.cpp index 73f11d82280..ef96231e1cc 100644 --- a/src/dbus/qdbusconnectionmanager.cpp +++ b/src/dbus/qdbusconnectionmanager.cpp @@ -1,6 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. // Copyright (C) 2016 Intel Corporation. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +// Qt-Security score:significant reason:default #include "qdbusconnectionmanager_p.h" @@ -32,8 +33,8 @@ QDBusConnectionPrivate *QDBusConnectionManager::busConnection(QDBusConnection::B return nullptr; // we'll start in suspended delivery mode if we're in the main thread - // (the event loop will resume delivery) - bool suspendedDelivery = QThread::isMainThread(); + // (the event loop will resume delivery) and QCoreApplication already exists + bool suspendedDelivery = QThread::isMainThread() && qApp; const auto locker = qt_scoped_lock(defaultBusMutex); if (defaultBuses[type]) |