diff --git a/src/services/spotify/clients/librespotcontroller.cpp b/src/services/spotify/clients/librespotcontroller.cpp index ce8f78cb..583fc647 100644 --- a/src/services/spotify/clients/librespotcontroller.cpp +++ b/src/services/spotify/clients/librespotcontroller.cpp @@ -23,7 +23,6 @@ static constexpr int PROCESS_TERMINATE_TIMEOUT_MS = 1000; LibrespotController::LibrespotController(QObject *parent) : AbstractSpotifyClientController(parent, gmLibrespotController()) { - m_hasAuthenticated = std::make_unique>(); initProcess(); } @@ -67,6 +66,7 @@ auto LibrespotController::start() -> QFuture } qCDebug(gmLibrespotController()) << QString(info); + m_hasAuthenticated = std::make_unique>(); m_hasAuthenticated->start(); const auto args = getLibrespotArgs(username); diff --git a/src/services/spotify/clients/librespotcontroller.h b/src/services/spotify/clients/librespotcontroller.h index 73306670..f5291990 100644 --- a/src/services/spotify/clients/librespotcontroller.h +++ b/src/services/spotify/clients/librespotcontroller.h @@ -50,7 +50,7 @@ class LibrespotController : public AbstractSpotifyClientController auto getLibrespotInfo() -> LibrespotInfo; void printOutputAndUpdateStatus(const QString &line); - std::unique_ptr> m_hasAuthenticated; + std::unique_ptr> m_hasAuthenticated = nullptr; private slots: void onLibrespotFinished(int exitCode, QProcess::ExitStatus exitStatus);