diff --git a/vpbs/src/main/java/biz/laenger/android/vpbs/ViewPagerBottomSheetBehavior.java b/vpbs/src/main/java/biz/laenger/android/vpbs/ViewPagerBottomSheetBehavior.java index bf8d7a8..5eac402 100644 --- a/vpbs/src/main/java/biz/laenger/android/vpbs/ViewPagerBottomSheetBehavior.java +++ b/vpbs/src/main/java/biz/laenger/android/vpbs/ViewPagerBottomSheetBehavior.java @@ -612,6 +612,10 @@ View findScrollingChild(View view) { if (view instanceof ViewPager) { ViewPager viewPager = (ViewPager) view; View currentViewPagerChild = ViewPagerUtils.getCurrentView(viewPager); + if (currentViewPagerChild == null) { + return null; + } + View scrollingChild = findScrollingChild(currentViewPagerChild); if (scrollingChild != null) { return scrollingChild;