Skip to content

Commit 8df935f

Browse files
authored
NullPointerException on screen rotation during exit fix (#5976)
1 parent aaea661 commit 8df935f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/fragments/detail/VideoDetailFragment.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,12 @@ private boolean shouldShowComments() {
10091009
}
10101010

10111011
public void updateTabLayoutVisibility() {
1012+
1013+
if (binding == null) {
1014+
//If binding is null we do not need to and should not do anything with its object(s)
1015+
return;
1016+
}
1017+
10121018
if (pageAdapter.getCount() < 2 || binding.viewPager.getVisibility() != View.VISIBLE) {
10131019
// hide tab layout if there is only one tab or if the view pager is also hidden
10141020
binding.tabLayout.setVisibility(View.GONE);

0 commit comments

Comments
 (0)