From 136076cc3e21cea7a6107ce6a3b890a4e187907a Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 23 Jan 2018 19:00:07 -0800 Subject: [PATCH] Fix a crash in StreamingPlaybackService.resolveNextIndex when the queue size is 1 and random is enabled. Oops. --- .../service/playback/impl/streaming/StreamingPlaybackService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt index fc3c650ae..af06d9470 100644 --- a/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt +++ b/src/musikdroid/app/src/main/java/io/casey/musikcube/remote/service/playback/impl/streaming/StreamingPlaybackService.kt @@ -574,7 +574,7 @@ class StreamingPlaybackService(context: Context) : IPlaybackService { private fun resolveNextIndex(currentIndex: Int, count: Int, userInitiated: Boolean): Int { if (shuffled) { /* our shuffle matches actually random for now. */ - if (count <= 0) { + if (count <= 1) { return currentIndex }