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

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Jan 4 14:39:33 CET 2017


On 01/03/2017 05:13 PM, Geoffrey Métais wrote:
> 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() {
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
Is there a case where the ML could be uninitialized while the user is 
able to insert an external media?


More information about the Android mailing list