Fixed NPE

This commit is contained in:
ByteHamster 2019-05-08 15:37:44 +02:00
parent c6e81391b2
commit e464569712
2 changed files with 5 additions and 2 deletions

View File

@ -592,7 +592,7 @@ public class ItemFragment extends Fragment implements OnSwipeGesture {
private FeedItem loadInBackground() { private FeedItem loadInBackground() {
FeedItem feedItem = DBReader.getFeedItem(feedItems[feedItemPos]); FeedItem feedItem = DBReader.getFeedItem(feedItems[feedItemPos]);
if (feedItem != null) { if (feedItem != null) {
Timeline t = new Timeline(getActivity(), feedItem); Timeline t = new Timeline(getContext(), feedItem);
webviewData = t.processShownotes(false); webviewData = t.processShownotes(false);
} }
return feedItem; return feedItem;

View File

@ -421,7 +421,10 @@ public class PlaybackService extends MediaBrowserServiceCompat {
// Child List // Child List
try { try {
for (FeedItem feedItem : taskManager.getQueue()) { for (FeedItem feedItem : taskManager.getQueue()) {
mediaItems.add(feedItem.getMedia().getMediaItem()); FeedMedia media = feedItem.getMedia();
if (media != null) {
mediaItems.add(media.getMediaItem());
}
} }
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();