Commit 9f3fe706 authored by Geoffrey Métais's avatar Geoffrey Métais

Prevent IndexOutOfBoundsException

(cherry picked from commit 26cc35ca)
parent 50024c93
......@@ -250,7 +250,9 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
}
public void onClick(View v){
MediaWrapper media = mVideos.get(getAdapterPosition());
MediaWrapper media = getItem(getAdapterPosition());
if (media == null)
return;
if (media instanceof MediaGroup) {
MainActivity activity = (MainActivity) mFragment.getActivity();
activity.showSecondaryFragment(SecondaryActivity.VIDEO_GROUP_LIST, media.getTitle());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment