fix: NPE in ChannelFragment::onSaveInstanceState

This commit is contained in:
ThetaDev 2023-04-06 11:44:01 +02:00 committed by Stypox
parent c03c344f49
commit 193c3e5b3d
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
1 changed files with 3 additions and 1 deletions

View File

@ -130,7 +130,9 @@ public class ChannelFragment extends BaseStateFragment<ChannelInfo>
@Override
public void onSaveInstanceState(final @NonNull Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt("LastTab", binding.tabLayout.getSelectedTabPosition());
if (binding != null) {
outState.putInt("LastTab", binding.tabLayout.getSelectedTabPosition());
}
}
@Override