From f0a7c547e890d655a28b1eaa4b04ad3ff5c3af2b Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 24 Nov 2025 17:51:42 +0400 Subject: [PATCH] Add safe check for strange click reports. --- Telegram/SourceFiles/history/history_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 3472266661..63b706bed5 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -5072,7 +5072,9 @@ void HistoryWidget::doneShow() { void HistoryWidget::cornerButtonsShowAtPosition( Data::MessagePosition position) { - if (position == Data::UnreadMessagePosition) { + if (!_peer) { + return; + } else if (position == Data::UnreadMessagePosition) { DEBUG_LOG(("JumpToEnd(%1, %2, %3): Show at unread requested." ).arg(_history->peer->name() ).arg(_history->inboxReadTillId().bare