Fix crash in topics admin log.

This commit is contained in:
John Preston 2022-10-20 13:07:31 +04:00
parent 4910a60499
commit 7aea54ad8f
1 changed files with 3 additions and 1 deletions

View File

@ -1681,7 +1681,9 @@ void GenerateItems(
const auto createDeleteTopic = [&](const LogDeleteTopic &data) {
auto topicLink = GenerateTopicLink(channel, data.vtopic());
topicLink.entities.erase(topicLink.entities.begin());
if (!topicLink.entities.empty()) {
topicLink.entities.erase(topicLink.entities.begin());
}
addSimpleServiceMessage(tr::lng_admin_log_topics_deleted(
tr::now,
lt_from,