[Android] VideoPlayer: fix null ptr exception

Thomas Guillem git at videolan.org
Mon Nov 30 14:23:05 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Nov 30 14:22:08 2015 +0100| [9fe3de37a74b9dd452efdd7ca82e687fb7f43afa] | committer: Thomas Guillem

VideoPlayer: fix null ptr exception

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=9fe3de37a74b9dd452efdd7ca82e687fb7f43afa
---

 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 fa836d5..6b25488 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2809,7 +2809,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
                 else
                     onPlaying();
             }
-            if (media.getTime() > 0l)
+            if (media != null && media.getTime() > 0l)
                 seek(media.getTime());
 
             // Get possible subtitles



More information about the Android mailing list