Fix possible crash in legacy group participants.

This commit is contained in:
John Preston 2023-07-20 18:44:40 +04:00
parent d60d80ba63
commit 93457c8ea3
1 changed files with 7 additions and 5 deletions

View File

@ -1341,11 +1341,13 @@ void ParticipantsBoxController::rebuildChatParticipants(
}
}
for (const auto &user : participants) {
if (auto row = createRow(user)) {
const auto raw = row.get();
delegate()->peerListAppendRow(std::move(row));
if (_stories) {
_stories->process(raw);
if (!delegate()->peerListFindRow(user->id.value)) {
if (auto row = createRow(user)) {
const auto raw = row.get();
delegate()->peerListAppendRow(std::move(row));
if (_stories) {
_stories->process(raw);
}
}
}
}