Fix crash in lottie animation destroy-on-init.

This commit is contained in:
John Preston 2020-03-06 15:07:24 +04:00
parent 14aa455164
commit 07eab8555a
2 changed files with 4 additions and 2 deletions

View File

@ -5106,6 +5106,8 @@ int HistoryWidget::countInitialScrollTop() {
}
void HistoryWidget::createUnreadBarIfBelowVisibleArea(int withScrollTop) {
Expects(_history != nullptr);
if (_history->unreadBar()) {
return;
}
@ -5227,7 +5229,7 @@ void HistoryWidget::updateHistoryGeometry(
newScrollTop = countInitialScrollTop();
_historyInited = true;
_scrollToAnimation.stop();
} else if (wasAtBottom && !loadedDown) {
} else if (wasAtBottom && !loadedDown && !_history->unreadBar()) {
newScrollTop = countAutomaticScrollTop();
} else {
newScrollTop = std::min(

@ -1 +1 @@
Subproject commit 17b6a6d53252b3e3ff02b113e352c152bd697896
Subproject commit 0f6c9f4acbdc2412a1a941b4ee96b150589b8369