[Android] Prevent NPE

Geoffrey Métais git at videolan.org
Mon Apr 13 14:08:19 CEST 2015


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



More information about the Android mailing list