[Android] Fix NPE in video player
Geoffrey Métais
git at videolan.org
Wed Dec 2 14:18:45 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 2 09:57:45 2015 +0100| [f84798f24a5bafa69af898f819fc2bb65dbb501d] | committer: Geoffrey Métais
Fix NPE in video player
(cherry picked from commit ca392f8aec108a2546ed20fd056879ba8d38ad9f)
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f84798f24a5bafa69af898f819fc2bb65dbb501d
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 3 ++-
1 file changed, 2 insertions(+), 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 52a4a4a..5162cc4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1541,7 +1541,8 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
if (isFinishing())
return;
//We may not have the permission to access files
- if (TextUtils.equals(mUri.getScheme(), "file") &&
+ if (AndroidUtil.isMarshMallowOrLater() && mUri != null &&
+ TextUtils.equals(mUri.getScheme(), "file") &&
!Permissions.canReadStorage()) {
Permissions.checkReadStoragePermission(this, true);
return;
More information about the Android
mailing list