diff --git a/shell/sessionlock.cpp b/shell/sessionlock.cpp --- a/shell/sessionlock.cpp +++ b/shell/sessionlock.cpp @@ -79,7 +79,7 @@ const QString lockFilename = lockFileForSession( sessionId ); QSharedPointer lockFile(new QLockFile( lockFilename )); - bool canLockDBus = !connectionInterface->isServiceRegistered( service ); + bool canLockDBus = connectionInterface && !connectionInterface->isServiceRegistered( service ); bool lockedDBus = false; // Lock D-Bus if we can and we need to