[Android] Fix AudioBrowserListAdapter crash

Jean-Baptiste Kempf git at videolan.org
Sat Jun 14 17:00:20 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Jun 14 17:00:07 2014 +0200| [78e76e81c555a4a8194ded7142bc21274dddbef3] | committer: Jean-Baptiste Kempf

Fix AudioBrowserListAdapter crash

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=78e76e81c555a4a8194ded7142bc21274dddbef3
---

 .../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java    |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index 1b27044..f138187 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -370,9 +370,9 @@ public class AudioBrowserListAdapter extends BaseAdapter implements SectionIndex
         int index;
         if(mSections.size() == 0)
             index = 0;
-        else if(sectionIndex > mSections.size())
+        else if(sectionIndex >= mSections.size())
             index = mSections.size() - 1;
-        else if(sectionIndex < 0)
+        else if(sectionIndex <= 0)
             index = 0;
         else
             index = sectionIndex;



More information about the Android mailing list