Fixed crash when creating chapters fragment

This commit is contained in:
ByteHamster 2020-02-04 21:36:33 +01:00
parent 7e2fd0b1d7
commit 81eb3b7341

View File

@ -274,7 +274,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem
@Override
boolean loadMediaInfo() {
if (controller != null) {
if (controller != null && controller.getMedia() != null) {
List<Chapter> chapters = controller.getMedia().getChapters();
boolean hasChapters = chapters != null && !chapters.isEmpty();
pageIndicator.setDisabledPage(hasChapters ? -1 : 2);