Commit 495b418f by andrewlewis Committed by Oliver Woodman

Add missing player null check

PiperOrigin-RevId: 272654378
parent 722722d8
...@@ -943,7 +943,7 @@ public class PlayerControlView extends FrameLayout { ...@@ -943,7 +943,7 @@ public class PlayerControlView extends FrameLayout {
// Cancel any pending updates and schedule a new one if necessary. // Cancel any pending updates and schedule a new one if necessary.
removeCallbacks(updateProgressAction); removeCallbacks(updateProgressAction);
int playbackState = player == null ? Player.STATE_IDLE : player.getPlaybackState(); int playbackState = player == null ? Player.STATE_IDLE : player.getPlaybackState();
if (player.isPlaying()) { if (player != null && player.isPlaying()) {
long mediaTimeDelayMs = long mediaTimeDelayMs =
timeBar != null ? timeBar.getPreferredUpdateDelay() : MAX_UPDATE_INTERVAL_MS; timeBar != null ? timeBar.getPreferredUpdateDelay() : MAX_UPDATE_INTERVAL_MS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment