Fix possible crash in inconsistent HistoryWidget state.

This commit is contained in:
John Preston 2020-03-30 16:43:09 +04:00
parent 31ba2828af
commit 8c6b5caa57
1 changed files with 1 additions and 2 deletions

View File

@ -1769,6 +1769,7 @@ void HistoryWidget::showHistory(
_showAtMsgId = showAtMsgId;
_historyInited = false;
_contactStatus = nullptr;
// Unload lottie animations.
Auth().data().unloadHeavyViewParts(HistoryInner::ElementDelegate());
@ -1786,8 +1787,6 @@ void HistoryWidget::showHistory(
}, _contactStatus->lifetime());
orderWidgets();
controller()->tabbedSelector()->setCurrentPeer(_peer);
} else {
_contactStatus = nullptr;
}
refreshTabbedPanel();