Fix crash in admin log right click.

Fixes #17325.
This commit is contained in:
John Preston 2021-12-07 15:41:55 +04:00
parent e3b9927faa
commit 1a0d430291
1 changed files with 3 additions and 2 deletions

View File

@ -1160,8 +1160,9 @@ void InnerWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) {
auto lnkIsVideo = lnkDocument ? lnkDocument->document()->isVideoFile() : false;
auto lnkIsVoice = lnkDocument ? lnkDocument->document()->isVoiceMessage() : false;
auto lnkIsAudio = lnkDocument ? lnkDocument->document()->isAudioFile() : false;
const auto fromId = PeerId(
link->property(kPeerLinkPeerIdProperty).toULongLong());
const auto fromId = PeerId(link
? link->property(kPeerLinkPeerIdProperty).toULongLong()
: 0);
if (lnkPhoto || lnkDocument) {
if (isUponSelected > 0) {
_menu->addAction(tr::lng_context_copy_selected(tr::now), [=] {