mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Fix ScrollView crash (though the root cause is a race condition most likely)
This commit is contained in:
parent
d3a143ecb6
commit
838ef03815
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user