From 59c38df5cc8b3ced8ac7caf67fc605e699eaae8b Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 24 Jul 2020 19:54:47 +0400 Subject: [PATCH] Fix crash in web page preview display. --- Telegram/SourceFiles/core/changelogs.cpp | 2 +- .../SourceFiles/history/view/history_view_webpage_preview.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/core/changelogs.cpp b/Telegram/SourceFiles/core/changelogs.cpp index e31932583..159f8a0ee 100644 --- a/Telegram/SourceFiles/core/changelogs.cpp +++ b/Telegram/SourceFiles/core/changelogs.cpp @@ -89,7 +89,7 @@ std::map BetaLogs() { 2001021, "- Edit your scheduled messages.\n" - "- See the unread messages indicator for the secondary accounts on the main menu button.\n" + "- See the unread messages indicator for your additional accounts on the main menu button.\n" "- Use Auto-Night Mode to make Telegram night mode match the system Dark Mode settings.\n" diff --git a/Telegram/SourceFiles/history/view/history_view_webpage_preview.cpp b/Telegram/SourceFiles/history/view/history_view_webpage_preview.cpp index ba0cbacdf..7ea777d79 100644 --- a/Telegram/SourceFiles/history/view/history_view_webpage_preview.cpp +++ b/Telegram/SourceFiles/history/view/history_view_webpage_preview.cpp @@ -70,9 +70,9 @@ bool DrawWebPageDataPreview(Painter &p, not_null d, QRect to) { const auto preview = photo ? photo->getReplyPreview(Data::FileOrigin()) : document->getReplyPreview(Data::FileOrigin()); - const auto w = preview->width(); - const auto h = preview->height(); if (preview) { + const auto w = preview->width(); + const auto h = preview->height(); if (w == h) { p.drawPixmap(to.x(), to.y(), preview->pix()); } else {