┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dbusinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbusinterface.cpp')
-rw-r--r--src/dbusinterface.cpp6
1 files changed, 4 insertions, 2 deletions
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)