mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +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:
@@ -2319,6 +2319,11 @@ namespace {
|
|||||||
ClickHandler::clearActive();
|
ClickHandler::clearActive();
|
||||||
ClickHandler::unpressed();
|
ClickHandler::unpressed();
|
||||||
|
|
||||||
|
if (AuthSession::Exists()) {
|
||||||
|
// Clear notifications to prevent any showNotification() calls while destroying items.
|
||||||
|
AuthSession::Current().notifications()->clearAllFast();
|
||||||
|
}
|
||||||
|
|
||||||
histories().clear();
|
histories().clear();
|
||||||
|
|
||||||
clearStorageImages();
|
clearStorageImages();
|
||||||
|
Reference in New Issue
Block a user