summaryrefslogtreecommitdiff
path: root/app/src/main/java/de/danoeh/antennapod/adapter
diff options
context:
space:
mode:
authorTom Hennen <tom.hennen@gmail.com>2015-06-27 09:01:46 -0400
committerTom Hennen <tom.hennen@gmail.com>2015-06-27 09:01:46 -0400
commit05ce266043dbc06d0c508547086eabfdffa36246 (patch)
tree096004b9b50cf477b6a70a2676d9f9ab8419f5e7 /app/src/main/java/de/danoeh/antennapod/adapter
parente332df4af572528f673745da2c7c13bf6ef43def (diff)
downloadAntennaPod-05ce266043dbc06d0c508547086eabfdffa36246.zip
fixes AntennaPod/AntennaPod#895
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/adapter')
-rw-r--r--app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
index f29cfdf2f..0eb15da8c 100644
--- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
+++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadLogAdapter.java
@@ -124,11 +124,15 @@ public class DownloadLogAdapter extends BaseAdapter {
ButtonHolder holder = (ButtonHolder) v.getTag();
if(holder.typeId == Feed.FEEDFILETYPE_FEED) {
Feed feed = DBReader.getFeed(context, holder.id);
- feed.setLastUpdate(new Date(0)); // force refresh
- try {
- DBTasks.refreshFeed(context, feed);
- } catch (DownloadRequestException e) {
- e.printStackTrace();
+ if (feed != null) {
+ feed.setLastUpdate(new Date(0)); // force refresh
+ try {
+ DBTasks.refreshFeed(context, feed);
+ } catch (DownloadRequestException e) {
+ e.printStackTrace();
+ }
+ } else {
+ Log.wtf(TAG, "Could not find feed for feed id: " + holder.id);
}
} else if(holder.typeId == FeedMedia.FEEDFILETYPE_FEEDMEDIA) {
FeedMedia media = DBReader.getFeedMedia(context, holder.id);