Ensure stories cursor isn't used during unread search but after closure.

This commit is contained in:
dosiecki 2014-04-19 22:57:07 -07:00
parent 427235ade6
commit 9cd0e9eeff

View file

@ -45,7 +45,7 @@ public abstract class ReadingAdapter extends FragmentStatePagerAdapter {
} }
public synchronized Story getStory(int position) { public synchronized Story getStory(int position) {
if (stories == null || stories.getColumnCount() == 0 || position >= stories.getCount() || position < 0) { if (stories == null || stories.isClosed() || stories.getColumnCount() == 0 || position >= stories.getCount() || position < 0) {
return null; return null;
} else { } else {
stories.moveToPosition(position); stories.moveToPosition(position);