[Android] Check ML is init when adding an external media

Geoffrey Métais git at videolan.org
Tue Jan 3 17:13:13 CET 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan  3 17:08:40 2017 +0100| [e9a55720d59e7ae17ada0f480fb90a6cbac818e1] | committer: Geoffrey Métais

Check ML is init when adding an external media

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

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

diff --git a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
index 93b1fda..67f674a 100644
--- a/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
+++ b/medialibrary/src/org/videolan/medialibrary/Medialibrary.java
@@ -206,7 +206,7 @@ public class Medialibrary {
     }
 
     public MediaWrapper addMedia(String mrl) {
-        return nativeAddMedia(mrl);
+        return mIsInitiated ? nativeAddMedia(mrl) : null;
     }
 
     public long getId() {



More information about the Android mailing list