Merge pull request #1902 from Ping20002015/master
Fix NPE for issue #1901
This commit is contained in:
commit
805d328d6c
1 changed files with 1 additions and 0 deletions
|
@ -1134,6 +1134,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();
|
||||||
|
|
Loading…
Reference in a new issue