mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-01 06:55:58 +00:00
Fix crash in web page preview display.
This commit is contained in:
@@ -89,7 +89,7 @@ std::map<int, const char*> BetaLogs() {
|
|||||||
2001021,
|
2001021,
|
||||||
"- Edit your scheduled messages.\n"
|
"- 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"
|
"- 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
|
const auto preview = photo
|
||||||
? photo->getReplyPreview(Data::FileOrigin())
|
? photo->getReplyPreview(Data::FileOrigin())
|
||||||
: document->getReplyPreview(Data::FileOrigin());
|
: document->getReplyPreview(Data::FileOrigin());
|
||||||
|
if (preview) {
|
||||||
const auto w = preview->width();
|
const auto w = preview->width();
|
||||||
const auto h = preview->height();
|
const auto h = preview->height();
|
||||||
if (preview) {
|
|
||||||
if (w == h) {
|
if (w == h) {
|
||||||
p.drawPixmap(to.x(), to.y(), preview->pix());
|
p.drawPixmap(to.x(), to.y(), preview->pix());
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user