From e978770fbdfc2458315a4f41b10c89e020604ca7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 3 Jun 2024 12:48:11 +0400 Subject: [PATCH] Fix crash in theme IV opening. --- .../history/view/media/history_view_web_page.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp index 31e79f46f1..b05a01ab8d 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_web_page.cpp @@ -430,13 +430,6 @@ QSize WebPage::countOptimalSize() { if (!iso2.isEmpty()) { factcheck->hint.link = AboutFactcheckClickHandler(iso2); } - } else if (_data->document - && (_data->document->isWallPaper() - || _data->document->isTheme())) { - _openl = std::make_shared( - std::move(_openl), - _data->document, - _parent->data()->fullId()); } else { _openl = _data->iv ? IvClickHandler(_data, original) @@ -444,6 +437,14 @@ QSize WebPage::countOptimalSize() { _data->url)) ? std::make_shared(_data->url) : std::make_shared(_data->url, true); + if (_data->document + && (_data->document->isWallPaper() + || _data->document->isTheme())) { + _openl = std::make_shared( + std::move(_openl), + _data->document, + _parent->data()->fullId()); + } } }