diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2015-01-04 20:59:35 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2015-01-04 20:59:35 +0100 |
commit | 9ece3a7db4949455cbaf0127e3eea3c4c739f9b1 (patch) | |
tree | 7da7a07bdc1a7e6461653075f9c9f66037ef503f /app/src/main/java/de | |
parent | b738fc268edc33dcc5064aece79babeaad6a3143 (diff) | |
download | AntennaPod-9ece3a7db4949455cbaf0127e3eea3c4c739f9b1.zip |
Fixed NullpointerException in ItemFragment
Diffstat (limited to 'app/src/main/java/de')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index 3a343199a..b2cdcb63c 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -197,14 +197,18 @@ public class ItemFragment extends Fragment implements LoaderManager.LoaderCallba @Override public void onClick(View v) { + if (item == null) { + return; + } actionButtonCallback.onActionButtonPressed(item); FeedMedia media = item.getMedia(); if (media != null && media.isDownloaded()) { // playback was started, dialog should close itself ((MainActivity) getActivity()).dismissChildFragment(); } - } + + } ); @@ -213,6 +217,10 @@ public class ItemFragment extends Fragment implements LoaderManager.LoaderCallba { @Override public void onClick(View v) { + if (item == null) { + return; + } + if (item.hasMedia()) { FeedMedia media = item.getMedia(); if (!media.isDownloaded()) { @@ -232,6 +240,9 @@ public class ItemFragment extends Fragment implements LoaderManager.LoaderCallba butMore.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + if (item == null) { + return; + } popupMenu.getMenu().clear(); popupMenu.inflate(R.menu.feeditem_dialog); if (item.hasMedia()) { |