fix: NPE in ChannelFragment::onSaveInstanceState

This commit is contained in:
ThetaDev 2023-04-06 11:44:01 +02:00 committed by Stypox
parent 59426378f1
commit 7a99f4910d

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