From 2997095bb30cb4ed2b759d9ee592b881e0f615a4 Mon Sep 17 00:00:00 2001 From: Prathamesh More Date: Fri, 24 Sep 2021 23:20:23 +0530 Subject: [PATCH] Fixed a crash --- .../code/name/monkey/retromusic/service/MusicService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java b/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java index 662d7755..3ab626a0 100644 --- a/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java +++ b/app/src/main/java/code/name/monkey/retromusic/service/MusicService.java @@ -1045,7 +1045,9 @@ public class MusicService extends MediaBrowserServiceCompat if (playback != null && playback.isPlaying()) { startFadeAnimator(playback, false, () -> { //Code to run when Animator Ends - playback.pause(); + if (playback != null) { + playback.pause(); + } notifyChange(PLAY_STATE_CHANGED); }); }