From cf63b0138e66d7250e559a3c9c5ee1c7df0a3352 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 23 Dec 2023 14:12:50 -0400 Subject: [PATCH] Fix crash in context menu. Regression was introduced in 4e3c1460f6. Fixes #27254. --- Telegram/SourceFiles/history/history_inner_widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index b7c5cba312..56eeb49d52 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -2526,7 +2526,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { ? link->copyToClipboardContextItemText() : QString(); - if (item->isSponsored()) { + if (item && item->isSponsored()) { FillSponsoredMessagesMenu(controller, item->fullId(), _menu); } if (isUponSelected > 0) {