From 81eb3b7341408c647ba6e71dd0fe6c603af8d60c Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Tue, 4 Feb 2020 21:36:33 +0100 Subject: [PATCH] Fixed crash when creating chapters fragment --- .../de/danoeh/antennapod/activity/MediaplayerInfoActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java index 3b81dbd0b..75819425c 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerInfoActivity.java @@ -274,7 +274,7 @@ public abstract class MediaplayerInfoActivity extends MediaplayerActivity implem @Override boolean loadMediaInfo() { - if (controller != null) { + if (controller != null && controller.getMedia() != null) { List chapters = controller.getMedia().getChapters(); boolean hasChapters = chapters != null && !chapters.isEmpty(); pageIndicator.setDisabledPage(hasChapters ? -1 : 2);