From dfb94a2503b5bf7f86bfe6ed15a07f1f3f802325 Mon Sep 17 00:00:00 2001 From: polymorphicshade Date: Fri, 21 Aug 2020 09:03:16 -0600 Subject: [PATCH] SponsorBlock: One more blockSponsorsButton null check --- .../main/java/org/schabi/newpipe/player/VideoPlayerImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java index 69559988d..209b948bb 100644 --- a/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java +++ b/app/src/main/java/org/schabi/newpipe/player/VideoPlayerImpl.java @@ -1607,6 +1607,10 @@ public class VideoPlayerImpl extends VideoPlayer protected void setBlockSponsorsButton(final ImageButton button, final boolean isBlockingSponsors) { + if (button == null) { + return; + } + button.setImageDrawable(AppCompatResources.getDrawable(service, isBlockingSponsors ? R.drawable.ic_sponsor_block_enable_white_24dp : R.drawable.ic_sponsor_block_disable_white_24dp));