mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-15 19:47:03 +00:00
Fix crash in notifications.
~HistoryItem() sometimes causes a queued notification to show. Custom notifications depend on MainWindow and it is destroyed already in clearHistories(), so clear the notifications queue first.
This commit is contained in:
parent
bc254228c9
commit
1395237810
@ -2319,6 +2319,11 @@ namespace {
|
||||
ClickHandler::clearActive();
|
||||
ClickHandler::unpressed();
|
||||
|
||||
if (AuthSession::Exists()) {
|
||||
// Clear notifications to prevent any showNotification() calls while destroying items.
|
||||
AuthSession::Current().notifications()->clearAllFast();
|
||||
}
|
||||
|
||||
histories().clear();
|
||||
|
||||
clearStorageImages();
|
||||
|
Loading…
Reference in New Issue
Block a user