From 86f53d3effd981db97cf818a754edfde45b595e7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 3 Jan 2022 11:40:42 +0300 Subject: [PATCH] Fix crash after comments button destruction. Regression was introduced in df66162bca. --- Telegram/SourceFiles/history/view/history_view_message.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 4a51bb2e2f..0f38c67b2b 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -2790,8 +2790,9 @@ int Message::resizeContentGetHeight(int newWidth) { if (item->repliesAreComments() || item->externalReply()) { newHeight += st::historyCommentsButtonHeight; - } else { + } else if (_comments) { _comments = nullptr; + checkHeavyPart(); } newHeight += viewButtonHeight(); } else if (mediaDisplayed) {