From 4551b1fbc94ddafe749ed59dfbd1a28456c3fe73 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 23 Jul 2019 20:53:37 +0200 Subject: [PATCH] Fixed crash when context is null From Google Play console --- .../java/de/danoeh/antennapod/fragment/ItemFragment.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index 149718569..432ada44e 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -603,8 +603,9 @@ public class ItemFragment extends Fragment implements OnSwipeGesture { @Nullable private FeedItem loadInBackground() { FeedItem feedItem = DBReader.getFeedItem(feedItems[feedItemPos]); - if (feedItem != null) { - Timeline t = new Timeline(getContext(), feedItem); + Context context = getContext(); + if (feedItem != null && context != null) { + Timeline t = new Timeline(context, feedItem); webviewData = t.processShownotes(false); } return feedItem;