Fix NPE and hide progress bar without media

This commit is contained in:
Martin Fietz 2015-05-13 10:29:52 +02:00
parent e98041c7ba
commit 69303a5915
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();