Skip to content

Commit

Permalink
Merge pull request #515 from minvws/2.2-testing-crashes
Browse files Browse the repository at this point in the history
fix crash on orientation change
  • Loading branch information
BartNijland91 authored Jul 22, 2021
2 parents be40eea + 118103c commit 0b7a581
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ class OnboardingFragment : Fragment(R.layout.fragment_onboarding) {

override fun onSaveInstanceState(outState: Bundle) {
super.onSaveInstanceState(outState)
outState.putInt(indicatorPositionKey, binding.viewPager.currentItem)
_binding?.let {
outState.putInt(indicatorPositionKey, it.viewPager.currentItem)
}
}

private fun initViewPager(
Expand Down

0 comments on commit 0b7a581

Please sign in to comment.