From b86d8d1362fdfac72d3789d70afdd7b4594e50c3 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sun, 13 Sep 2026 07:23:33 +0300 Subject: [PATCH] Fixed retain cycles of credits entry image states. --- Telegram/SourceFiles/ui/effects/credits_graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/ui/effects/credits_graphics.cpp b/Telegram/SourceFiles/ui/effects/credits_graphics.cpp index 925c936dab..b71bb8caad 100644 --- a/Telegram/SourceFiles/ui/effects/credits_graphics.cpp +++ b/Telegram/SourceFiles/ui/effects/credits_graphics.cpp @@ -346,7 +346,7 @@ PaintRoundImageCallback GenerateCreditsPaintEntryCallback( rpl::single(rpl::empty_value()) | rpl::then( photo->session().downloaderTaskFinished() - ) | rpl::on_next([=] { + ) | rpl::on_next([=, state = state.get()] { using Size = Data::PhotoSize; if (const auto large = state->view->image(Size::Large)) { state->imagePtr = large; @@ -396,7 +396,7 @@ PaintRoundImageCallback GenerateCreditsPaintEntryCallback( rpl::single(rpl::empty_value()) | rpl::then( video->session().downloaderTaskFinished() - ) | rpl::on_next([=] { + ) | rpl::on_next([=, state = state.get()] { if (const auto thumbnail = state->view->thumbnail()) { state->imagePtr = thumbnail; }