From c915366c7b813e1d51f8bd992d334f6e7e675212 Mon Sep 17 00:00:00 2001 From: Domingos Lopes Date: Sun, 27 Mar 2016 20:01:15 -0400 Subject: account for when MediaStatus returned from RemoteMediaPlayer is null --- .../java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core') diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java index 7ed5a2fd9..7ca9149fd 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/RemotePSMP.java @@ -81,6 +81,11 @@ public class RemotePSMP extends PlaybackServiceMediaPlayer { @Override public void onRemoteMediaPlayerStatusUpdated() { MediaStatus status = castMgr.getMediaStatus(); + if (status == null) { + setBuffering(false); + setPlayerStatus(PlayerStatus.INDETERMINATE, null); + return; + } Playable currentMedia = localVersion(status.getMediaInfo()); long position = status.getStreamPosition(); if (position > 0 && currentMedia.getPosition()==0) { -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0