Commit 1cbd6a81 authored by Geoffrey Métais's avatar Geoffrey Métais

Add nullity check

parent b87bef97
......@@ -422,9 +422,10 @@ class PlaylistManager(val service: PlaybackService) : MediaWrapperList.EventList
}
private suspend fun determinePrevAndNextIndices(expand: Boolean = false) {
if (expand) {
val media = getCurrentMedia()
if (expand && media !== null) {
expanding = true
nextIndex = expand(getCurrentMedia()!!.type == MediaWrapper.TYPE_STREAM)
nextIndex = expand(media.type == MediaWrapper.TYPE_STREAM)
expanding = false
} else {
nextIndex = -1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment