From 93457c8ea32008d64f1e325186f5da3dea66c67f Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 20 Jul 2023 18:44:40 +0400 Subject: [PATCH] Fix possible crash in legacy group participants. --- .../boxes/peers/edit_participants_box.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index c35fc9fbb..72291faf4 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -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); + } } } }