Skip to content

Commit 15b2f99

Browse files
Emily Janzerfacebook-github-bot
Emily Janzer
authored andcommitted
Guard against content view being null in onOverScrolled
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
1 parent 71a8944 commit 15b2f99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ public void setEndFillColor(int color) {
665665

666666
@Override
667667
protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
668-
if (mScroller != null) {
668+
if (mScroller != null && mContentView != null) {
669669
// FB SCROLLVIEW CHANGE
670670

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

0 commit comments

Comments
 (0)