[Android] Prevent NPE

Steve Lhomme robux4 at gmail.com
Mon Apr 13 16:13:17 CEST 2015


You can't check the MIME type instead of the file extension ?

On Mon, Apr 13, 2015 at 2:08 PM, Geoffrey Métais <git at videolan.org> wrote:
> vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Apr 13 11:34:53 2015 +0200| [fbe8364a4993559abada74aa40013eb043cd405e] | committer: Geoffrey Métais
>
> Prevent NPE
>
>> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=fbe8364a4993559abada74aa40013eb043cd405e
> ---
>
>  vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
> index bc2d07a..6b0a222 100644
> --- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
> +++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
> @@ -3079,7 +3079,7 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
>      }
>
>      private void updateNavStatus() {
> -        mHasMenu = mLibVLC.getChapterCountForTitle(0) > 1 && mLibVLC.getTitleCount() > 1 && !mLocation.endsWith(".mkv");
> +        mHasMenu = mLibVLC.getChapterCountForTitle(0) > 1 && mLibVLC.getTitleCount() > 1 && (mLocation == null || !mLocation.endsWith(".mkv"));
>          mIsNavMenu = mHasMenu && mLibVLC.getTitle() == 0;
>          /***
>           * HACK ALERT: assume that any media with >1 titles = DVD with menus
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android


More information about the Android mailing list