[Android] MediaWrapper: Sanity check
Geoffrey Métais
git at videolan.org
Tue Mar 19 15:35:14 CET 2019
vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 18 10:14:23 2019 +0100| [9fbe9a4a3ca5cadd7ec718acb40935ddadd27148] | committer: Geoffrey Métais
MediaWrapper: Sanity check
> https://code.videolan.org/videolan/vlc-android/commit/9fbe9a4a3ca5cadd7ec718acb40935ddadd27148
---
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