mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 07:37:11 +02:00
Fix crash in web page preview display.
This commit is contained in:
parent
5655ad25b0
commit
59c38df5cc
2 changed files with 3 additions and 3 deletions
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue