From 5eafe9652531e443e395e18db729adef13747c71 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 14 Oct 2024 22:32:59 +0300 Subject: [PATCH] Fixed crash in share QR box on copy without profile photo. --- Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp index 526b9700e..426f9705f 100644 --- a/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/peer_qr_box.cpp @@ -889,7 +889,9 @@ void FillPeerQrBox( usernameValue()).current().toUpper(); const auto link = rpl::variable(linkValue()); const auto textWidth = font->width(username); - const auto top = userpicMedia->image(photoSize); + const auto top = photoSize + ? userpicMedia->image(photoSize) + : QImage(); const auto weak = Ui::MakeWeak(box); crl::async([=] {