diff --git a/Common/UI/ScrollView.cpp b/Common/UI/ScrollView.cpp index 26833eee73..991f1c25db 100644 --- a/Common/UI/ScrollView.cpp +++ b/Common/UI/ScrollView.cpp @@ -203,6 +203,9 @@ bool ScrollView::Touch(const TouchInput &input) { ScrollView::Bob ScrollView::ComputeBob() const { Bob bob{}; + if (views_.empty()) { + return bob; + } float childHeight = std::max(0.01f, views_[0]->GetBounds().h); float scrollMax = std::max(0.0f, childHeight - bounds_.h); float ratio = bounds_.h / childHeight;