Merge pull request #1343 from TomHennen/fix1339
fix NPE in ItemFragment. fixes AntennaPod/AntennaPod#1339
This commit is contained in:
commit
c5d99a84b2
|
@ -324,8 +324,16 @@ public class ItemFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAppearance() {
|
private void updateAppearance() {
|
||||||
|
if (item == null) {
|
||||||
|
Log.d(TAG, "updateAppearance item is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
txtvTitle.setText(item.getTitle());
|
txtvTitle.setText(item.getTitle());
|
||||||
txtvPublished.setText(DateUtils.formatDateTime(getActivity(), item.getPubDate().getTime(), DateUtils.FORMAT_ABBREV_ALL));
|
|
||||||
|
if (item.getPubDate() != null) {
|
||||||
|
txtvPublished.setText(DateUtils.formatDateTime(getActivity(), item.getPubDate().getTime(), DateUtils.FORMAT_ABBREV_ALL));
|
||||||
|
}
|
||||||
|
|
||||||
Glide.with(getActivity())
|
Glide.with(getActivity())
|
||||||
.load(item.getImageUri())
|
.load(item.getImageUri())
|
||||||
|
|
Loading…
Reference in New Issue