[Android] AudioListFragment: Avoid crashes
Jean-Baptiste Kempf
git at videolan.org
Tue Nov 13 12:47:07 CET 2012
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Nov 13 12:46:39 2012 +0100| [12433b4d0f93aa7e54dae0576960612d4cbcc990] | committer: Jean-Baptiste Kempf
AudioListFragment: Avoid crashes
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=12433b4d0f93aa7e54dae0576960612d4cbcc990
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
index fdf7f57..e118370 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioListFragment.java
@@ -214,6 +214,10 @@ public class AudioListFragment extends SherlockListFragment {
private Comparator<Media> byMRL = new Comparator<Media>() {
public int compare(Media m1, Media m2) {
+ if( m1 == null)
+ return -1;
+ else if( m2 == null)
+ return 1;
return String.CASE_INSENSITIVE_ORDER.compare(m1.getLocation(), m2.getLocation());
};
};
More information about the Android
mailing list