Check media and mediaItem for null as suggested by mfietz
This commit is contained in:
parent
831166cfb2
commit
6e8baf839a
|
@ -405,9 +405,11 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
Long feedId = Long.parseLong(parentId.split(":")[1]);
|
Long feedId = Long.parseLong(parentId.split(":")[1]);
|
||||||
List<FeedItem> feedItems = DBReader.getFeedItemList(DBReader.getFeed(feedId));
|
List<FeedItem> feedItems = DBReader.getFeedItemList(DBReader.getFeed(feedId));
|
||||||
for (FeedItem feedItem: feedItems) {
|
for (FeedItem feedItem: feedItems) {
|
||||||
|
if(feedItem.getMedia() != null && feedItem.getMedia().getMediaItem() != null) {
|
||||||
mediaItems.add(feedItem.getMedia().getMediaItem());
|
mediaItems.add(feedItem.getMedia().getMediaItem());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
result.sendResult(mediaItems);
|
result.sendResult(mediaItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue