Fix crash in video userpics.

Fixes #24665.
This commit is contained in:
John Preston 2022-06-22 12:03:47 +04:00
parent 5738998310
commit 7f6c163449

View file

@ -1218,6 +1218,9 @@ HistoryInner::VideoUserpic *HistoryInner::validateVideoUserpic(
return i->second.get(); return i->second.get();
} }
const auto repaint = [=] { const auto repaint = [=] {
if (hasPendingResizedItems()) {
return;
}
enumerateUserpics([&](not_null<Element*> view, int userpicTop) { enumerateUserpics([&](not_null<Element*> view, int userpicTop) {
// stop the enumeration if the userpic is below the painted rect // stop the enumeration if the userpic is below the painted rect
if (userpicTop >= _visibleAreaBottom) { if (userpicTop >= _visibleAreaBottom) {