From 3bc661f583266a857edbde585d7a54a440c0b55e Mon Sep 17 00:00:00 2001 From: Stypox Date: Tue, 31 Aug 2021 11:11:11 +0200 Subject: [PATCH] Fix null pointer exception in player initialization --- app/src/main/java/org/schabi/newpipe/player/Player.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/Player.java b/app/src/main/java/org/schabi/newpipe/player/Player.java index 832c40cd3..63c31e082 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -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())