Fix assertion violation in media overview.

Regression was introduced in 5e7e7eaa83.
This commit is contained in:
John Preston 2021-12-22 13:05:54 +00:00
parent 797433ebe9
commit a7e552ccab
1 changed files with 3 additions and 2 deletions

View File

@ -853,11 +853,12 @@ void ListWidget::itemRemoved(not_null<const HistoryItem*> item) {
FullMsgId ListWidget::computeFullId(
UniversalMsgId universalId) const {
Expects(universalId != 0);
Expects(universalId > 0 || _migrated != nullptr);
return (universalId > 0)
? FullMsgId(_peer->id, universalId)
: FullMsgId(_migrated->id, ServerMaxMsgId + universalId);
: FullMsgId(
(_peer ? _peer.get() : _migrated)->id,
ServerMaxMsgId + universalId);
}
auto ListWidget::collectSelectedItems() const -> SelectedItems {