mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-04 08:25:38 +00:00
Fix crash in session destruction.
This commit is contained in:
@@ -253,6 +253,9 @@ Session::Session(not_null<Main::Session*> session)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Session::clear() {
|
void Session::clear() {
|
||||||
|
// Optimization: clear notifications before destroying items.
|
||||||
|
Core::App().notifications().clearFromSession(_session);
|
||||||
|
|
||||||
_sendActions.clear();
|
_sendActions.clear();
|
||||||
|
|
||||||
_histories->unloadAll();
|
_histories->unloadAll();
|
||||||
@@ -1120,8 +1123,6 @@ void Session::setupUserIsContactViewer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Session::~Session() {
|
Session::~Session() {
|
||||||
// Optimization: clear notifications before destroying items.
|
|
||||||
Core::App().notifications().clearFromSession(_session);
|
|
||||||
clearLocalStorage();
|
clearLocalStorage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user