diff --git a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp index 0df9876625..069ec5b1a1 100644 --- a/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp +++ b/Telegram/SourceFiles/history/admin_log/history_admin_log_inner.cpp @@ -1088,12 +1088,15 @@ void InnerWidget::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { } if (lnkPhoto) { const auto photo = lnkPhoto->photo(); - _menu->addAction(tr::lng_context_save_image(tr::now), App::LambdaDelayed(st::defaultDropdownMenu.menu.ripple.hideDuration, this, [=] { - savePhotoToFile(photo); - })); - _menu->addAction(tr::lng_context_copy_image(tr::now), [=] { - copyContextImage(photo); - }); + const auto media = photo->activeMediaView(); + if (!photo->isNull() && media && media->loaded()) { + _menu->addAction(tr::lng_context_save_image(tr::now), App::LambdaDelayed(st::defaultDropdownMenu.menu.ripple.hideDuration, this, [=] { + savePhotoToFile(photo); + })); + _menu->addAction(tr::lng_context_copy_image(tr::now), [=] { + copyContextImage(photo); + }); + } if (photo->hasAttachedStickers()) { const auto controller = _controller; auto callback = [=] { diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 704d5d95d6..495376acc0 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -1579,12 +1579,15 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { } }; const auto addPhotoActions = [&](not_null photo) { - _menu->addAction(tr::lng_context_save_image(tr::now), App::LambdaDelayed(st::defaultDropdownMenu.menu.ripple.hideDuration, this, [=] { - savePhotoToFile(photo); - })); - _menu->addAction(tr::lng_context_copy_image(tr::now), [=] { - copyContextImage(photo); - }); + const auto media = photo->activeMediaView(); + if (!photo->isNull() && media && media->loaded()) { + _menu->addAction(tr::lng_context_save_image(tr::now), App::LambdaDelayed(st::defaultDropdownMenu.menu.ripple.hideDuration, this, [=] { + savePhotoToFile(photo); + })); + _menu->addAction(tr::lng_context_copy_image(tr::now), [=] { + copyContextImage(photo); + }); + } if (photo->hasAttachedStickers()) { _menu->addAction(tr::lng_context_attached_stickers(tr::now), [=] { session->api().attachedStickers().requestAttachedStickerSets(