Fix ArrayIndexOutOfBoundsException

See Play store crash report
No idea why this happens...
This commit is contained in:
Martin Fietz 2015-11-26 16:02:48 +01:00
parent d91e9f4d6f
commit 6bf4d28c34
1 changed files with 2 additions and 2 deletions

View File

@ -335,7 +335,7 @@ public class AllEpisodesFragment extends Fragment {
@Override
public int getCount() {
if (itemsLoaded) {
if (episodes != null) {
return episodes.size();
}
return 0;
@ -343,7 +343,7 @@ public class AllEpisodesFragment extends Fragment {
@Override
public FeedItem getItem(int position) {
if (itemsLoaded) {
if (episodes != null && position < episodes.size()) {
return episodes.get(position);
}
return null;