Fix possible crash in pinned item translations.

This commit is contained in:
John Preston 2023-07-21 13:15:38 +04:00
parent 2402285d03
commit 9d8d039886
1 changed files with 3 additions and 4 deletions

View File

@ -1840,13 +1840,12 @@ void HistoryInner::performDrag() {
}
void HistoryInner::itemRemoved(not_null<const HistoryItem*> item) {
if (_history != item->history() && _migrated != item->history()) {
return;
}
if (_pinnedItem == item) {
_pinnedItem = nullptr;
}
if (_history != item->history() && _migrated != item->history()) {
return;
}
if (_reactionsItem.current() == item) {
_reactionsItem = nullptr;
}