[Android] Fix IndexOutOfBoundsException

Geoffrey Métais git at videolan.org
Tue Dec 8 09:52:39 CET 2015


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec  8 09:51:29 2015 +0100| [a712747fc3f81bb5a661640468fd60b2a3220225] | committer: Geoffrey Métais

Fix IndexOutOfBoundsException

> https://code.videolan.org/videolan/vlc-android/commit/a712747fc3f81bb5a661640468fd60b2a3220225
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
index 1e1e130..5cba7bc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -204,7 +204,7 @@ public class VideoListAdapter extends RecyclerView.Adapter<VideoListAdapter.View
 
     @Nullable
     public MediaWrapper getItem(int position) {
-        if (position < 0 || position > mVideos.size())
+        if (position < 0 || position >= mVideos.size())
             return null;
         else
             return mVideos.get(position);



More information about the Android mailing list