mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-09-07 04:24:09 +02:00
Fix crash in handlePendingHistoryUpdate().
This method is called from InvokeQueued, so the auth session could be destroyed already and should be checked before being accessed.
This commit is contained in:
parent
2f816942b8
commit
e0c74c9546
1 changed files with 3 additions and 0 deletions
|
@ -361,6 +361,9 @@ void historyMuteUpdated(History *history) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void handlePendingHistoryUpdate() {
|
void handlePendingHistoryUpdate() {
|
||||||
|
if (!AuthSession::Exists()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
AuthSession::Current().data().pendingHistoryResize().notify(true);
|
AuthSession::Current().data().pendingHistoryResize().notify(true);
|
||||||
|
|
||||||
for (auto item : base::take(Global::RefPendingRepaintItems())) {
|
for (auto item : base::take(Global::RefPendingRepaintItems())) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue