From 7f6c16344949735218eb5fe7470d9ba48b358ac3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 22 Jun 2022 12:03:47 +0400 Subject: [PATCH] Fix crash in video userpics. Fixes #24665. --- Telegram/SourceFiles/history/history_inner_widget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 08018ac92..0cc6185dd 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -1218,6 +1218,9 @@ HistoryInner::VideoUserpic *HistoryInner::validateVideoUserpic( return i->second.get(); } const auto repaint = [=] { + if (hasPendingResizedItems()) { + return; + } enumerateUserpics([&](not_null view, int userpicTop) { // stop the enumeration if the userpic is below the painted rect if (userpicTop >= _visibleAreaBottom) {