[Android] Fix IndexOutOfBoundsException

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


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

Fix IndexOutOfBoundsException

(cherry picked from commit a712747fc3f81bb5a661640468fd60b2a3220225)

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

 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 5bc5063..0357652 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoListAdapter.java
@@ -203,7 +203,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