[Android] MediaWrapper: Sanity check

Geoffrey Métais git at videolan.org
Mon Mar 18 15:45:22 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 18 10:14:23 2019 +0100| [623b6262e85668c9e7c4538d32b431fb71929f03] | committer: Geoffrey Métais

MediaWrapper: Sanity check

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

 medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java b/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java
index 29cd3a7a2..e9b740739 100644
--- a/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java
+++ b/medialibrary/src/org/videolan/medialibrary/media/MediaWrapper.java
@@ -166,7 +166,7 @@ public class MediaWrapper extends MediaLibraryItem implements Parcelable {
     }
 
     private String manageVLCMrl(String mrl) {
-        if (mrl.charAt(0) == '/') {
+        if (!mrl.isEmpty() && mrl.charAt(0) == '/') {
             mrl = "file://" + mrl;
         } else if (mrl.toLowerCase().startsWith("vlc://")) {
             mrl = mrl.substring(6);



More information about the Android mailing list