From f514a439e22db0563f9cf1be712d2ec8873dbc22 Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Sun, 4 Mar 2018 22:12:57 +0100 Subject: [PATCH] Fix possible NPE accessing image.download_url May fix #2386. If so, thanks to @cyplo who provided the logcat output which directed me to that code path. --- core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java b/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java index 746dd43c4..78df74ee7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java +++ b/core/src/main/java/de/danoeh/antennapod/core/feed/Feed.java @@ -305,8 +305,10 @@ public class Feed extends FeedFile implements FlattrThing, ImageResource { if (super.compareWithOther(other)) { return true; } - if(other.image != null && !TextUtils.equals(image.download_url, other.image.download_url)) { - return true; + if (other.image != null) { + if (image == null || !TextUtils.equals(image.download_url, other.image.download_url)) { + return true; + } } if (!TextUtils.equals(feedTitle, other.feedTitle)) { return true;