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.
This commit is contained in:
Jan Niehusmann 2018-03-04 22:12:57 +01:00
parent c13acc624d
commit f514a439e2

View File

@ -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;