From 7aea54ad8f3d218a2478b4a26ba5f29f7555f2e8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 20 Oct 2022 13:07:31 +0400 Subject: [PATCH] Fix crash in topics admin log. --- .../SourceFiles/history/admin_log/history_admin_log_item.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp index 021b19dae6..f1d3a5d091 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_item.cpp @@ -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,