From 4dd572063ef5b38d9c31e66b306e47727702e106 Mon Sep 17 00:00:00 2001 From: kapodamy Date: Sun, 17 Feb 2019 16:59:35 -0300 Subject: [PATCH] fix crash while switching from popup to fullscreen player, or closing the popup player. --- .../main/java/org/schabi/newpipe/player/PopupVideoPlayer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java index f5c731ed9..8ea3d509c 100644 --- a/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/PopupVideoPlayer.java @@ -626,6 +626,7 @@ public final class PopupVideoPlayer extends Service { @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { super.onLoadingComplete(imageUri, view, loadedImage); + if (playerImpl == null) return; // rebuild notification here since remote view does not release bitmaps, // causing memory leaks resetNotification();