From 7b5ba3bdc2a41ca87a170b21928a09791d4ab5fc Mon Sep 17 00:00:00 2001 From: Ping20002015 Date: Fri, 23 Nov 2018 19:38:01 +0100 Subject: [PATCH] Fix NPE for issue #1901 --- app/src/main/java/org/schabi/newpipe/player/BasePlayer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 0e4d07179..b71976eda 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -1106,6 +1106,7 @@ public abstract class BasePlayer implements } public boolean isPlaying() { + if (simpleExoPlayer == null) return false; final int state = simpleExoPlayer.getPlaybackState(); return (state == Player.STATE_READY || state == Player.STATE_BUFFERING) && simpleExoPlayer.getPlayWhenReady();