diff --git a/src/MatrixClient.cpp b/src/MatrixClient.cpp index 2ceb53a8..ea3799b6 100644 --- a/src/MatrixClient.cpp +++ b/src/MatrixClient.cpp @@ -28,22 +28,20 @@ Q_DECLARE_METATYPE(std::vector) Q_DECLARE_METATYPE(std::vector) Q_DECLARE_METATYPE(std::set) -namespace { -auto client_ = std::make_shared(); -} namespace http { mtx::http::Client * client() { + static auto client_ = std::make_shared(); return client_.get(); } bool is_logged_in() { - return !client_->access_token().empty(); + return !client()->access_token().empty(); } void