Merge pull request #3828 from ByteHamster/fix-crash
Fixed crash when creating chapters fragment
This commit is contained in:
commit
9b76119578
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue