Fix possible crash in application shutdown.
This commit is contained in:
parent
e4834f583f
commit
bcb07110e0
|
@ -246,6 +246,11 @@ not_null<Dialogs::MainList*> ChatFilters::chatsList(FilterId filterId) {
|
|||
return pointer.get();
|
||||
}
|
||||
|
||||
void ChatFilters::clear() {
|
||||
_chatsLists.clear();
|
||||
_list.clear();
|
||||
}
|
||||
|
||||
void ChatFilters::setPreloaded(const QVector<MTPDialogFilter> &result) {
|
||||
_loadRequestId = -1;
|
||||
received(result);
|
||||
|
|
|
@ -113,6 +113,7 @@ public:
|
|||
void refreshHistory(not_null<History*> history);
|
||||
|
||||
[[nodiscard]] not_null<Dialogs::MainList*> chatsList(FilterId filterId);
|
||||
void clear();
|
||||
|
||||
const ChatFilter &applyUpdatedPinned(
|
||||
FilterId id,
|
||||
|
|
|
@ -388,6 +388,7 @@ void Session::clear() {
|
|||
for (const auto &[id, folder] : _folders) {
|
||||
folder->clearChatsList();
|
||||
}
|
||||
_chatsFilters->clear();
|
||||
_histories->clearAll();
|
||||
_webpages.clear();
|
||||
_locations.clear();
|
||||
|
|
Loading…
Reference in New Issue