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
|
@Override
|
||||||
boolean loadMediaInfo() {
|
boolean loadMediaInfo() {
|
||||||
if (controller != null) {
|
if (controller != null && controller.getMedia() != null) {
|
||||||
List<Chapter> chapters = controller.getMedia().getChapters();
|
List<Chapter> chapters = controller.getMedia().getChapters();
|
||||||
boolean hasChapters = chapters != null && !chapters.isEmpty();
|
boolean hasChapters = chapters != null && !chapters.isEmpty();
|
||||||
pageIndicator.setDisabledPage(hasChapters ? -1 : 2);
|
pageIndicator.setDisabledPage(hasChapters ? -1 : 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user