Fix crash in context menu.

Regression was introduced in 4e3c1460f6.

Fixes #27254.
This commit is contained in:
John Preston 2023-12-23 14:12:50 -04:00
parent 3cbe0aae4a
commit cf63b0138e
1 changed files with 1 additions and 1 deletions

View File

@ -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) {