Fix crash in web page preview display.

This commit is contained in:
John Preston 2020-07-24 19:54:47 +04:00
parent 5655ad25b0
commit 59c38df5cc
2 changed files with 3 additions and 3 deletions

View file

@ -89,7 +89,7 @@ std::map<int, const char*> 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"

View file

@ -70,9 +70,9 @@ bool DrawWebPageDataPreview(Painter &p, not_null<WebPageData*> 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 {