From 43d36c7560eb018a2e450466d75c1dbbf136a961 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sun, 20 Sep 2020 11:52:09 +0200 Subject: [PATCH] Fixed crash when item has no feed Apparently, there are ways to end up with items that have no feed. This hotfix prevents the app from crashing but it does not solve the reason for items without feeds. --- .../main/java/de/danoeh/antennapod/core/storage/DBReader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java index c30f46315..7330a6c80 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java @@ -154,6 +154,7 @@ public final class DBReader { Feed feed = feedIndex.get(item.getFeedId()); if (feed == null) { Log.w(TAG, "No match found for item with ID " + item.getId() + ". Feed ID was " + item.getFeedId()); + feed = new Feed("", "", "Error: Item without feed"); } item.setFeed(feed); }