Fix null pointer exception in player initialization

This commit is contained in:
Stypox 2021-08-31 11:11:11 +02:00
parent cf9b482be2
commit 3bc661f583
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 1 additions and 0 deletions

View File

@ -675,6 +675,7 @@ public final class Player implements
&& isPlaybackResumeEnabled(this)
&& !samePlayQueue
&& !newQueue.isEmpty()
&& newQueue.getItem() != null
&& newQueue.getItem().getRecoveryPosition() == PlayQueueItem.RECOVERY_UNSET) {
databaseUpdateDisposable.add(recordManager.loadStreamState(newQueue.getItem())
.observeOn(AndroidSchedulers.mainThread())