Fix NPE for issue #1901

This commit is contained in:
Ping20002015 2018-11-23 19:38:01 +01:00
parent 74a2f11c86
commit 6cf1cbec0b

View file

@ -1106,6 +1106,7 @@ public abstract class BasePlayer implements
} }
public boolean isPlaying() { public boolean isPlaying() {
if (simpleExoPlayer == null) return false;
final int state = simpleExoPlayer.getPlaybackState(); final int state = simpleExoPlayer.getPlaybackState();
return (state == Player.STATE_READY || state == Player.STATE_BUFFERING) return (state == Player.STATE_READY || state == Player.STATE_BUFFERING)
&& simpleExoPlayer.getPlayWhenReady(); && simpleExoPlayer.getPlayWhenReady();