diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index fb9aac776..beb499c8f 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -281,6 +281,9 @@ class HttpReadAloudService : BaseReadAloudService(), return@launch } val speakTextLength = contentList[nowSpeak].length + if (speakTextLength <= 0) { + return@launch + } val sleep = mediaPlayer.duration / speakTextLength val start = speakTextLength * mediaPlayer.currentPosition / mediaPlayer.duration for (i in start..contentList[nowSpeak].length) {