From 1e6948bbc7592e0bd027f7e9b97dc2262b0a97d0 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 2 Sep 2024 12:49:38 +0200 Subject: [PATCH] Fix crash during logout --- src/spacehierarchycache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spacehierarchycache.cpp b/src/spacehierarchycache.cpp index 98567b924..cb9998a19 100644 --- a/src/spacehierarchycache.cpp +++ b/src/spacehierarchycache.cpp @@ -89,7 +89,7 @@ void SpaceHierarchyCache::addBatch(const QString &spaceId, Quotient::GetSpaceHie group.sync(); const auto nextBatchToken = job->nextBatch(); - if (!nextBatchToken.isEmpty() && nextBatchToken != *m_nextBatchTokens[spaceId]) { + if (!nextBatchToken.isEmpty() && nextBatchToken != *m_nextBatchTokens[spaceId] && m_connection) { *m_nextBatchTokens[spaceId] = nextBatchToken; auto nextJob = m_connection->callApi(spaceId, std::nullopt, std::nullopt, std::nullopt, *m_nextBatchTokens[spaceId]); connect(nextJob, &BaseJob::success, this, [this, nextJob, spaceId]() {