diff --git a/library/src/main/java/com/jaredrummler/fastscrollrecyclerview/FastScrollRecyclerView.java b/library/src/main/java/com/jaredrummler/fastscrollrecyclerview/FastScrollRecyclerView.java index 6541b0c..7ec94bc 100644 --- a/library/src/main/java/com/jaredrummler/fastscrollrecyclerview/FastScrollRecyclerView.java +++ b/library/src/main/java/com/jaredrummler/fastscrollrecyclerview/FastScrollRecyclerView.java @@ -340,6 +340,9 @@ public String scrollToPositionAtProgress(float touchFraction) { *

Override in each subclass of this base class.

*/ public void onUpdateScrollbar(int dy) { + if (getAdapter() == null) { + return; + } int rowCount = getAdapter().getItemCount(); if (getLayoutManager() instanceof GridLayoutManager) { int spanCount = ((GridLayoutManager) getLayoutManager()).getSpanCount();