X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/480b3067d25e4b49ea55285313a7c10e93f98ffd..32c1bd71880b3987700aee2d42bfba83c7a1a3bd:/src/dbusinterface.cpp diff --git a/src/dbusinterface.cpp b/src/dbusinterface.cpp index 7e453f72a..2b674b968 100644 --- a/src/dbusinterface.cpp +++ b/src/dbusinterface.cpp @@ -20,8 +20,10 @@ DBusInterface::DBusInterface() : { QDBusConnection::sessionBus().registerObject(QStringLiteral("/org/freedesktop/FileManager1"), this, QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors); - QDBusConnection::sessionBus().interface()->registerService(QStringLiteral("org.freedesktop.FileManager1"), - QDBusConnectionInterface::QueueService); + QDBusConnectionInterface *sessionInterface = QDBusConnection::sessionBus().interface(); + if (sessionInterface) { + sessionInterface->registerService(QStringLiteral("org.freedesktop.FileManager1"), QDBusConnectionInterface::QueueService); + } } void DBusInterface::ShowFolders(const QStringList& uriList, const QString& startUpId)