mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 14:08:41 +00: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:
@@ -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())) {
|
||||||
|
Reference in New Issue
Block a user