Files
react-native/ReactAndroid/src/main/java/com/facebook/react/views
Brent Vatneandfacebook-github-bot-3 e9f95c1a7d Check for contentView before emitting scroll event
Summary:
I've found that when switching between tabs that each have ScrollViews, sometimes `emitScrollEvent` fires without a `contentView`, which causes the following crash:

```
`D/AndroidRuntime(24496): Shutting down VM
E/AndroidRuntime(24496): FATAL EXCEPTION: main
E/AndroidRuntime(24496): Process: com.listexp, PID: 24496
E/AndroidRuntime(24496): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getWidth()' on a null object reference
E/AndroidRuntime(24496):        at com.facebook.react.views.scroll.ReactScrollViewHelper.emitScrollEvent(ReactScrollViewHelper.java:59)
E/AndroidRuntime(24496):        at com.facebook.react.views.scroll.ReactScrollViewHelper.emitScrollMomentumEndEvent(ReactScrollViewHelper.java:46)
E/AndroidRuntime(24496):        at com.facebook.react.views.scroll.ReactScrollView$1.run(ReactScrollView.java:159)
E/AndroidRuntime(24496):        at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(24496):        at android.os.Handler.disp
Closes https://github.com/facebook/react-native/pull/5561

Reviewed By: svcscm

Differential Revision: D2876385

Pulled By: androidtrunkagent

fb-gh-sync-id: 33406eaa96352d5adae857088da09fb446b68440
2016-01-28 15:12:50 -08:00
..
2016-01-25 06:01:46 -08:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-01-25 06:01:46 -08:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00
2016-01-25 06:01:46 -08:00
2016-01-22 16:20:13 +00:00
2016-01-22 16:20:13 +00:00