Prevent NPE
This commit is contained in:
parent
c1819864fe
commit
d675f74dcb
|
@ -68,7 +68,7 @@ public class ChaptersFragment extends ListFragment implements AudioplayerContent
|
|||
this.media = media;
|
||||
adapter.setMedia(media);
|
||||
adapter.notifyDataSetChanged();
|
||||
if(media.getChapters() == null) {
|
||||
if(media == null || media.getChapters() == null || media.getChapters().size() == 0) {
|
||||
setEmptyText(getString(R.string.no_items_label));
|
||||
} else {
|
||||
setEmptyText(null);
|
||||
|
|
Loading…
Reference in New Issue