summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMeir Schwarz <meir@imdde.com>2017-04-10 15:27:24 -0700
committerMeir Schwarz <meir@imdde.com>2017-04-10 15:27:24 -0700
commit6e8baf839a15b51cda75da96621dc7fbf1d00d25 (patch)
tree0322ba5d1fd3421665bd246f41a92c2fc83d7993 /core
parent831166cfb2a08d0d13d36f73b9331b87e5d1664b (diff)
downloadAntennaPod-6e8baf839a15b51cda75da96621dc7fbf1d00d25.zip
Check media and mediaItem for null as suggested by mfietz
Diffstat (limited to 'core')
-rw-r--r--core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
index 5f1912775..2d70d8258 100644
--- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
+++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java
@@ -405,7 +405,9 @@ public class PlaybackService extends MediaBrowserServiceCompat {
Long feedId = Long.parseLong(parentId.split(":")[1]);
List<FeedItem> feedItems = DBReader.getFeedItemList(DBReader.getFeed(feedId));
for (FeedItem feedItem: feedItems) {
- mediaItems.add(feedItem.getMedia().getMediaItem());
+ if(feedItem.getMedia() != null && feedItem.getMedia().getMediaItem() != null) {
+ mediaItems.add(feedItem.getMedia().getMediaItem());
+ }
}
}
result.sendResult(mediaItems);