Merge pull request #812 from mfietz/issue/811-getImageUri-NPE

Fix NPE and hide progress bar without media
This commit is contained in:
Tom Hennen 2015-05-13 20:29:29 -04:00
commit 113ab1092e
2 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,11 @@ public class NewEpisodesListAdapter extends BaseAdapter {
holder.downloadProgress.setProgress(itemAccess.getItemDownloadProgressPercent(item));
}
}
} else {
holder.downloadProgress.setVisibility(View.GONE);
holder.txtvDuration.setVisibility(View.GONE);
}
if (itemAccess.isInQueue(item)) {
holder.queueStatus.setVisibility(View.VISIBLE);
} else {

View File

@ -318,7 +318,7 @@ public class FeedItem extends FeedComponent implements ShownotesProvider, Flattr
@Override
public Uri getImageUri() {
if(media.hasEmbeddedPicture()) {
if(media != null && media.hasEmbeddedPicture()) {
return media.getImageUri();
} else if (hasItemImageDownloaded()) {
return image.getImageUri();