Skip to content

Commit

Permalink
Guard against content view being null in onOverScrolled
Browse files Browse the repository at this point in the history
Summary:
It seems that the content view can sometimes be null when onOverScrolled is called (presumably when the scrollview gets unmounted while it's in the middle of scrolling?).

Changelog: [Android][fixed] - Guard against content view being null in onOverScrolled.

Reviewed By: mdvacca

Differential Revision: D14737534

fbshipit-source-id: e88ec6f585e50517b734a8809fc3843c0b22df10
  • Loading branch information
Emily Janzer authored and facebook-github-bot committed Apr 3, 2019
1 parent 71a8944 commit 15b2f99
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ public void setEndFillColor(int color) {

@Override
protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
if (mScroller != null) {
if (mScroller != null && mContentView != null) {
// FB SCROLLVIEW CHANGE

// This is part two of the reimplementation of fling to fix the bounce-back bug. See #fling() for
Expand Down

0 comments on commit 15b2f99

Please sign in to comment.