From 201e5ee09d96bf7f033f405b040e2f02146ad396 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 25 Jun 2021 09:14:15 +0200 Subject: [PATCH] Fix NPE when connecting via BT --- app/src/main/java/org/schabi/newpipe/player/Player.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 0a0ad619f..f5384a9d9 100644 --- a/app/src/main/java/org/schabi/newpipe/player/Player.java +++ b/app/src/main/java/org/schabi/newpipe/player/Player.java @@ -2160,7 +2160,10 @@ public final class Player implements private void onCompleted() { if (DEBUG) { - Log.d(TAG, "onCompleted() called"); + Log.d(TAG, "onCompleted() called" + (playQueue == null ? ". playQueue is null" : "")); + } + if (playQueue == null) { + return; } animate(binding.playPauseButton, false, 0, AnimationType.SCALE_AND_ALPHA, 0,