Prevent NPE

This commit is contained in:
Martin Fietz 2016-01-27 13:27:16 +01:00
parent c1819864fe
commit d675f74dcb
1 changed files with 1 additions and 1 deletions

View File

@ -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);