Merge pull request #3888 from nextcloud/bugfix/crash-sync-summary

Check if current user exists before getting it's account state
This commit is contained in:
Matthieu Gallien 2021-10-13 17:18:44 +02:00 committed by GitHub
commit 4296eb3571
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,11 @@ SyncStatusSummary::SyncStatusSummary(QObject *parent)
void SyncStatusSummary::load()
{
auto accountState = UserModel::instance()->currentUser()->accountState();
const auto currentUser = UserModel::instance()->currentUser();
if (!currentUser) {
return;
}
auto accountState = currentUser->accountState();
if (_accountState.data() == accountState.data()) {
return;