diff --git a/app/src/main/java/awais/instagrabber/customviews/PostsRecyclerView.java b/app/src/main/java/awais/instagrabber/customviews/PostsRecyclerView.java index 0524cff7..e5771537 100644 --- a/app/src/main/java/awais/instagrabber/customviews/PostsRecyclerView.java +++ b/app/src/main/java/awais/instagrabber/customviews/PostsRecyclerView.java @@ -283,9 +283,13 @@ public class PostsRecyclerView extends RecyclerView { } public void refresh() { - lazyLoader.resetState(); - postFetcher.reset(); - postFetcher.fetch(); + if (lazyLoader != null) { + lazyLoader.resetState(); + } + if (postFetcher != null) { + postFetcher.reset(); + postFetcher.fetch(); + } dispatchFetchStatus(); }