summaryrefslogtreecommitdiff
path: root/net/discovery
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2023-02-23 23:05:54 +0100
committerGitHub <noreply@github.com>2023-02-23 23:05:54 +0100
commit28844af6ff608151db25f3245372e3e8cbae84cc (patch)
treefa0a9419516b149f526e94c81f09a8718c6eec5b /net/discovery
parent240737e3acee6d6c56ce8ca782b99f54205a4ea9 (diff)
downloadAntennaPod-28844af6ff608151db25f3245372e3e8cbae84cc.zip
Fix crash in iTunes loader (#6341)
Diffstat (limited to 'net/discovery')
-rw-r--r--net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesTopListLoader.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesTopListLoader.java b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesTopListLoader.java
index 0bfc5a863..5fa48458e 100644
--- a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesTopListLoader.java
+++ b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesTopListLoader.java
@@ -58,8 +58,9 @@ public class ItunesTopListLoader {
List<PodcastSearchResult> suggestedPodcasts, List<Feed> subscribedFeeds, int limit) {
Set<String> subscribedPodcastsSet = new HashSet<>();
for (Feed subscribedFeed : subscribedFeeds) {
- String subscribedTitle = subscribedFeed.getTitle().trim() + " - " + subscribedFeed.getAuthor().trim();
- subscribedPodcastsSet.add(subscribedTitle);
+ if (subscribedFeed.getTitle() != null && subscribedFeed.getAuthor() != null) {
+ subscribedPodcastsSet.add(subscribedFeed.getTitle().trim() + " - " + subscribedFeed.getAuthor().trim());
+ }
}
List<PodcastSearchResult> suggestedNotSubscribed = new ArrayList<>();
for (PodcastSearchResult suggested : suggestedPodcasts) {