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

View file

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