SponsorBlock: One more blockSponsorsButton null check
This commit is contained in:
parent
e18579b016
commit
dfb94a2503
1 changed files with 4 additions and 0 deletions
|
@ -1607,6 +1607,10 @@ public class VideoPlayerImpl extends VideoPlayer
|
||||||
|
|
||||||
protected void setBlockSponsorsButton(final ImageButton button,
|
protected void setBlockSponsorsButton(final ImageButton button,
|
||||||
final boolean isBlockingSponsors) {
|
final boolean isBlockingSponsors) {
|
||||||
|
if (button == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
button.setImageDrawable(AppCompatResources.getDrawable(service, isBlockingSponsors
|
button.setImageDrawable(AppCompatResources.getDrawable(service, isBlockingSponsors
|
||||||
? R.drawable.ic_sponsor_block_enable_white_24dp
|
? R.drawable.ic_sponsor_block_enable_white_24dp
|
||||||
: R.drawable.ic_sponsor_block_disable_white_24dp));
|
: R.drawable.ic_sponsor_block_disable_white_24dp));
|
||||||
|
|
Loading…
Reference in a new issue