Merge pull request #3828 from ByteHamster/fix-crash

Fixed crash when creating chapters fragment
This commit is contained in:
H. Lehmann 2020-02-04 22:09:16 +01:00 committed by GitHub
commit 9b76119578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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