Check for null
This commit is contained in:
parent
d1eb616800
commit
557d97b450
|
@ -116,6 +116,9 @@ public class ItunesSearchFragment extends Fragment {
|
||||||
//Show information about the podcast when the list item is clicked
|
//Show information about the podcast when the list item is clicked
|
||||||
gridView.setOnItemClickListener((parent, view1, position, id) -> {
|
gridView.setOnItemClickListener((parent, view1, position, id) -> {
|
||||||
Podcast podcast = searchResults.get(position);
|
Podcast podcast = searchResults.get(position);
|
||||||
|
if(podcast.feedUrl == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!podcast.feedUrl.contains("itunes.apple.com")) {
|
if (!podcast.feedUrl.contains("itunes.apple.com")) {
|
||||||
Intent intent = new Intent(getActivity(), OnlineFeedViewActivity.class);
|
Intent intent = new Intent(getActivity(), OnlineFeedViewActivity.class);
|
||||||
intent.putExtra(OnlineFeedViewActivity.ARG_FEEDURL, podcast.feedUrl);
|
intent.putExtra(OnlineFeedViewActivity.ARG_FEEDURL, podcast.feedUrl);
|
||||||
|
|
Loading…
Reference in New Issue