Fix possible crash with pinned message deletion.

This commit is contained in:
John Preston 2023-02-06 10:36:21 +04:00
parent fb283c4828
commit 81fb4046d1

View file

@ -1757,6 +1757,9 @@ void HistoryInner::itemRemoved(not_null<const HistoryItem*> item) {
return;
}
if (_pinnedItem == item) {
_pinnedItem = nullptr;
}
if (_reactionsItem.current() == item) {
_reactionsItem = nullptr;
}