Merge pull request #2587 from jannic/pr

Fix possible NPE accessing image.download_url
This commit is contained in:
Martin Fietz 2018-03-05 20:28:44 +01:00 committed by GitHub
commit f3299e7de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -305,9 +305,11 @@ 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)) {
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;
}