mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix possible crash in logout.
This commit is contained in:
parent
aa8ca28f77
commit
13ad39dfc2
1 changed files with 5 additions and 1 deletions
|
@ -956,8 +956,12 @@ OthersUnreadState OtherAccountsUnreadStateCurrent() {
|
|||
}
|
||||
}
|
||||
}
|
||||
// In case we are logging out in the last paint for the slide animation
|
||||
// the account doesn't have the session here already.
|
||||
const auto current = active->maybeSession();
|
||||
return {
|
||||
.count = (app.unreadBadge() - active->session().data().unreadBadge()),
|
||||
.count = (app.unreadBadge()
|
||||
- (current ? current->data().unreadBadge() : 0)),
|
||||
.allMuted = allMuted,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue