diff options
author | Tom Hennen <tom.hennen@gmail.com> | 2015-08-05 18:06:27 -0400 |
---|---|---|
committer | Tom Hennen <tom.hennen@gmail.com> | 2015-08-05 18:06:27 -0400 |
commit | d1972ad0e630ee40a625507ef2b7a5a3321b8902 (patch) | |
tree | e045623b42cc0fbc567a7178179a6e36b67df750 /app/src/main/java/de/danoeh/antennapod/adapter | |
parent | 8e2b3371e1279628995786288b06bbe5a931d337 (diff) | |
download | AntennaPod-d1972ad0e630ee40a625507ef2b7a5a3321b8902.zip |
resolves NPE in QueueListAdapter
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/QueueListAdapter.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/QueueListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/QueueListAdapter.java index 73d7c9252..b14268cf6 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/QueueListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/QueueListAdapter.java @@ -155,14 +155,19 @@ public class QueueListAdapter extends BaseAdapter { holder.butSecondary.setTag(item); holder.butSecondary.setOnClickListener(secondaryActionListener); - Log.d(TAG, item.getFeed().getImageUri().toString()); + Uri feedImageUri = item.getFeed().getImageUri(); + if (feedImageUri != null) { + Log.d(TAG, item.getFeed().getImageUri().toString()); + } else { + Log.d(TAG, "Feed has null image uri"); + } Glide.with(context) .load(item.getImageUri()) .diskCacheStrategy(DiskCacheStrategy.SOURCE) .fitCenter() .dontAnimate() - .into(new CoverTarget(item.getFeed().getImageUri(), holder.placeholder, holder.cover)); + .into(new CoverTarget(feedImageUri, holder.placeholder, holder.cover)); return convertView; } |