SponsorBlock: One more blockSponsorsButton null check

This commit is contained in:
polymorphicshade 2020-08-21 09:03:16 -06:00
parent e18579b016
commit dfb94a2503

View file

@ -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));